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 check fails on OS X due to make build-libc #1028

Closed
gz-c opened this issue Mar 4, 2018 · 4 comments
Closed

make check fails on OS X due to make build-libc #1028

gz-c opened this issue Mar 4, 2018 · 4 comments
Assignees
Labels
libc stdev wip Work in progress
Milestone

Comments

@gz-c
Copy link
Member

gz-c commented Mar 4, 2018

This fails on OS X, the solution is to do brew install snaipe/soft/criterion

  • The README should be updated to include this instruction for OS X machines wishing to build libskycoin
  • libskycoin should not be built by default in make check. Travis should perform the libskycoin test separately
mkdir -p build/usr/tmp build/usr/lib build/usr/include
mkdir -p build/libskycoin bin include
rm -Rf build/libskycoin/*
go build -buildmode=c-shared  -o build/libskycoin/libskycoin.so ./lib/cgo/main.go
go build -buildmode=c-archive -o build/libskycoin/libskycoin.a  ./lib/cgo/main.go
mv build/libskycoin/libskycoin.h include/
cp lib/cgo/tests/*.c build/libskycoin/
gcc -o bin/test_libskycoin_shared build/libskycoin/*.c -lskycoin                    -lcriterion -Iinclude -Ibuild/usr/include -L build/libskycoin -Lbuild/usr/lib
build/libskycoin/check_cipher.c:2:10: fatal error: 'criterion/criterion.h' file not found
#include <criterion/criterion.h>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [test-libc] Error 1
@gz-c gz-c added this to the 0.22 milestone Mar 4, 2018
@gz-c
Copy link
Member Author

gz-c commented Mar 4, 2018

Upon further review,

make install-deps-libc should be documented in the "Client Libraries" section https://github.com/skycoin/skycoin#client-libraries of the README.

This section also says:

Skycoin implements client libraries which export core functionality for usage from other programming languages. Read the corresponding README file for further details.

This corresponding README file should be linked to.

make install-deps-libc should detect OS X and use brew install snaipe/soft/criterion

@gz-c
Copy link
Member Author

gz-c commented Mar 4, 2018

#1029 removes make test-libc from the list of targets for make test. Travis will still run these tests.

@olemis
Copy link
Contributor

olemis commented Mar 4, 2018

@gz-c dependencies to run make test-libc are installed by the make install-deps-libc target . The later is not executed by the former because Criterion may be installed globally .

I did not use brew install version for MacOS X before because I had some issues with that approach .

Should I use Debian / Ubuntu packages on Linux ?

@olemis olemis added wip Work in progress stdev labels Mar 4, 2018
@gz-c
Copy link
Member Author

gz-c commented Mar 5, 2018

Since make test-libc is separated, it is sufficient to document installation instructions in the README, either installing from source via the make command or using the system's package manager

olemis added a commit to simelo/skycoin that referenced this issue Mar 5, 2018
olemis added a commit to simelo/skycoin that referenced this issue Mar 6, 2018
olemis added a commit to simelo/skycoin that referenced this issue Mar 7, 2018
@gz-c gz-c closed this as completed in fdad48e Mar 7, 2018
olemis added a commit to simelo/skycoin that referenced this issue Apr 6, 2018
gz-c added a commit that referenced this issue Apr 7, 2018
[lib] refs #1028 - libskycoin.h is generated in include folder
@olemis olemis added the libc label Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc stdev wip Work in progress
Projects
None yet
Development

No branches or pull requests

2 participants