Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error #7

Open
yoonkihoon opened this issue Mar 27, 2021 · 4 comments
Open

make error #7

yoonkihoon opened this issue Mar 27, 2021 · 4 comments

Comments

@yoonkihoon
Copy link

Hi,
How can I get around with this make error?

2bwt-lib/Socket.c:90:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
90 | if (socketPath == '\0' || socketPath[0] == '\0') {
| ~~~~~~~~~~~^~~~~~~
2bwt-lib/Socket.c: In function ‘Socket* SocketInitiateConnection(int, const char*)’:
2bwt-lib/Socket.c:152:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
152 | if (socketPath == '\0' || socketPath[0] == '\0') {
| ~~~~~~~~~~~^~~~~~~
make: *** [: 2bwt-lib/Socket.o] Error 1

Thanks!

@chunlaw
Copy link
Collaborator

chunlaw commented May 3, 2021

Could you state the version of g++ being used?

@tcgriffith
Copy link

I had the same error
Here's my gcc version:

gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@claus-h-g
Copy link

claus-h-g commented Aug 3, 2022

I did run in to the same error:

2bwt-lib/Socket.c: In function \u2018Socket* SocketInitiateConnection(int, const char*)\u2019:
2bwt-lib/Socket.c:152:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (socketPath == '\0' || socketPath[0] == '\0') {
^~~~
: recipe for target '2bwt-lib/Socket.o' failed
make: *** [2bwt-lib/Socket.o] Error 1
rm .alignment.cpp .DV-DPfunctions.cpp .SOAP3-DP.cpp .DV-SemiDP.cpp .DV-DPForSingleReads.cpp .DV-Kernel.cpp .DV-DPForBothUnalign.cpp

my version of g++:
g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I hope to work with a NVIDIA GeForce RTX 2070, CUDA version: 11.6.

Did any one find a fix for this error?

@ealyn
Copy link

ealyn commented Mar 13, 2023

Compare to NULL could fix these.
Try modify 2bwt-lib/Socket.c line 90 and 152 to if (socketPath == NULL || socketPath[0] == '\0') {.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants