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

Not running on Travis CI precise environment #8

Closed
Etiene opened this issue Feb 14, 2016 · 7 comments
Closed

Not running on Travis CI precise environment #8

Etiene opened this issue Feb 14, 2016 · 7 comments

Comments

@Etiene
Copy link

Etiene commented Feb 14, 2016

Hello! I need some help getting bcrypt to work :)
It works fine on my machine (osx), but not on Travis CI precise environment (ubuntu 12.04):

error loading module 'bcrypt' from file '/home/travis/build/sailorproject/sailor/install/luarocks/lib/lua/5.1/bcrypt.so':
    /home/travis/build/sailorproject/sailor/install/luarocks/lib/lua/5.1/bcrypt.so: undefined symbol: clock_gettime

https://travis-ci.org/sailorproject/sailor/jobs/109013322

Line 165 shows gcc version is 4.6.3
Line 306 shows libc6 version is 2.15
Updating gcc did not solve the problem
I tried many things but I did not succeed in updating libc6

I noticed you do add -lrt flag on compiling, I thought it should be enough, but well, I dont know what's going on then...

This is the luarocks output when installing bcrypt on travis machine

Using https://luarocks.org/bcrypt-2.1-2.src.rock... switching to 'build' mode
Warning: variable CFLAGS was not passed in build_variables
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG -O0 -c -o compat/safebfuns.o compat/safebfuns.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/bcrypt/bcrypt.o compat/bcrypt/bcrypt.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/bcrypt/blowfish.o compat/bcrypt/blowfish.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/arc4random/arc4random.o compat/arc4random/arc4random.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/strlcpy.o compat/strlcpy.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/sha/sha512.o compat/sha/sha512.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o compat/getentropy/getentropy_linux.o compat/getentropy/getentropy_linux.c
gcc -I/home/travis/build/sailorproject/sailor/install/lua/include -DOPENSSL_cleanse=explicit_bzero -D__BSD_VISIBLE -DHAVE_STRNDUP -Iinclude -Wall -Wno-pointer-sign -O2 -fPIC -DNDEBUG   -c -o src/main.o src/main.c
gcc -o bcrypt.so -shared -lrt compat/safebfuns.o compat/bcrypt/bcrypt.o compat/bcrypt/blowfish.o compat/arc4random/arc4random.o compat/strlcpy.o compat/sha/sha512.o compat/getentropy/getentropy_linux.o src/main.o
Updating manifest for /home/travis/build/sailorproject/sailor/install/luarocks/lib/luarocks/rocks
bcrypt 2.1-2 is now built and installed in /home/travis/build/sailorproject/sailor/install/luarocks (license: ISC)

Thanks for your help :)

@moteus
Copy link

moteus commented Feb 14, 2016

@Etiene
Copy link
Author

Etiene commented Feb 14, 2016

That was my first thought, but apparently it's already being linked? (https://github.com/mikejsavage/lua-bcrypt/blob/master/Makefile.mess#L37)

@xspager
Copy link

xspager commented Feb 14, 2016

Try moving LDFLAGS to the end of the line in https://github.com/mikejsavage/lua-bcrypt/blob/master/Makefile#L16 (suggestion from http://stackoverflow.com/a/8088766)

@Etiene
Copy link
Author

Etiene commented Feb 14, 2016

According to your link it doesn't really need to be at the end of the line, just after bcrypt.so, which is already happening...

@Etiene
Copy link
Author

Etiene commented Feb 14, 2016

Oh no, wait, I confused it! Ok, I'm gonna try that

@mikejsavage
Copy link
Owner

Thanks for the report, and thanks xspager for the fix!

@Etiene
Copy link
Author

Etiene commented Feb 14, 2016

I already retried with the 2.1-3 build and it's solved on my end!
Thank you all! <3

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

4 participants