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

build fail on linux and mac #87

Closed
iamfaith opened this issue Mar 7, 2021 · 5 comments
Closed

build fail on linux and mac #87

iamfaith opened this issue Mar 7, 2021 · 5 comments

Comments

@iamfaith
Copy link

iamfaith commented Mar 7, 2021

gcc -o build/src/trace.o -c -std=c99 -Wall -g3 -gdwarf -O2 -fpic -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I include -I src -I src/pb src/trace.c
gcc -o build/src/utils.o -c -std=c99 -Wall -g3 -gdwarf -O2 -fpic -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I include -I src -I src/pb src/utils.c
gcc -o build/src/test/test_utils.o -c -std=c99 -Wall -g3 -gdwarf -O2 -fpic -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I include -I src -I src/pb src/test/test_utils.c
gcc -shared -o build/libconnxr.so -fpic -I/home/linuxbrew/.linuxbrew/opt/[email protected]/include -I include -I src -I src/pb -std=c99 -Wall -g3 -gdwarf -O2 -fpic -L/home/linuxbrew/.linuxbrew/opt/[email protected]/lib -g -lcunit -lm find build/src/ -type f
/usr/bin/ld: cannot find -lcunit
collect2: error: ld returned 1 exit status
Makefile:105: recipe for target 'build/sharedlib' failed
make: *** [build/sharedlib] Error 1

uname -a

Linux faith 5.4.0-53-generic #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

@alrevuelta
Copy link
Owner

Thanks for reporting the issue. Which commit are you running and which command? make all? Works fine for me on mac and linux CI (which is also Ubuntu) is also fine.

@nopeslide
Copy link
Collaborator

/usr/bin/ld: cannot find -lcunit
collect2: error: ld returned 1 exit status

Install cunit via your package manager and you should be fine.
cunit is the only dependency we have for..well..testing

@nopeslide
Copy link
Collaborator

@alrevuelta since this is the second issue regarding missing cunit installation, should we add information about this to the README?

@iamfaith
Copy link
Author

iamfaith commented Mar 8, 2021

Thanks. I found this command to solve this issue.

sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

@iamfaith iamfaith closed this as completed Mar 8, 2021
@nopeslide
Copy link
Collaborator

sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

thanks. will add this to the README

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

3 participants