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

Extra flags needed for build #2

Open
drewhemm opened this issue May 9, 2021 · 0 comments
Open

Extra flags needed for build #2

drewhemm opened this issue May 9, 2021 · 0 comments

Comments

@drewhemm
Copy link

drewhemm commented May 9, 2021

I had to add a couple of extra flags to the build in order to get it to work:

$ c++ -I . -o hdrdmacp *.cc -libverbs -lz -pthread

The -I . was needed to explicitly set the working directory as the include path, otherwise I would get this error:

$ c++ -o hdrdmacp *.cc -libverbs -lz
hdRDMA.cc:2:10: fatal error: hdRDMA.h: No such file or directory
 #include <hdRDMA.h>
          ^~~~~~~~~~
compilation terminated.
hdrdmacp.cc:5:10: fatal error: hdRDMA.h: No such file or directory
 #include <hdRDMA.h>
          ^~~~~~~~~~
compilation terminated.
In file included from hdRDMAThread.cc:12:
hdRDMA.h:19:10: fatal error: hdRDMAThread.h: No such file or directory
 #include <hdRDMAThread.h>
          ^~~~~~~~~~~~~~

And the -pthread was needed for cross-platform building I believe:

c++ -I . -o hdrdmacp *.cc -libverbs -lz
/usr/bin/ld: /tmp/ccH1rQ0c.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

With those two additions, I was able to build successfully.

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

1 participant