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

Travis CI currently fails #3

Closed
thomasjfox opened this issue Sep 8, 2017 · 5 comments
Closed

Travis CI currently fails #3

thomasjfox opened this issue Sep 8, 2017 · 5 comments

Comments

@thomasjfox
Copy link
Contributor

Testing with Travis CI currently fails.
tl;dr: It picks up the wrong libmagic.so:
file: compiled magic version [532] does not match with shared library magic version [514]

.travis.yml basically does a "make" and "make install".
After that it calls "file --version" and from the log you can see it's the current file version.
It does not set any LD_LIBRARY_PATH. What happens now is that it will pick up the "libmagic.so" from Travis CI's system instead of the just built one.

We could either tweak around the LD_LIBRARY_PATH or set -rpath during compile time.
Something like "LDFLAGS=-Wl,-rpath $BUILD_DIR". That's how I do it for my local file-tests invocation.

Example log output showing the problem:
https://travis-ci.org/file/file-tests/jobs/272927961

$ file --version
file-5.32
magic file from /etc/magic:/usr/share/misc/magic

The command "file --version" exited with 0.

python update-db.py -m file/magic/Magdir
using file from /usr/bin/file
version is file-5.32
magic file from /etc/magic:/usr/share/misc/magic
[ ################################################ ] 100% Splitting patterns
file: compiled magic version [532] does not match with shared library magic version [514]
file: Unknown !: entry `!:ext cwk'
.. [CRASH] ..

@glensc
Copy link
Member

glensc commented Sep 8, 2017

the make install was made there with the purpose of replacing system version from installed one. an easy solution quickly made.

i see two solutions to this:

  1. cleanup system leftovers of file package install
  2. be independent of file package present in the os

"2" is better solution as it would make the test suite usable outside travis too (developers machines), "1" is probably just easier to implement (apt-get purge file perhaps).

@thomasjfox
Copy link
Contributor Author

thomasjfox commented Sep 8, 2017 via email

@glensc
Copy link
Member

glensc commented Sep 8, 2017

ok, i made the 1" solution so far, seems working:
https://travis-ci.org/file/file-tests/builds/273411358

can't test osx part because travis macos infrastructure is down:
https://www.traviscistatus.com/
https://www.traviscistatus.com/incidents/4qylrqvy50gy

this doesn't mean the "2" can't be made as well :)

@zoulasc
Copy link
Contributor

zoulasc commented Jan 22, 2019

this has been fixed a long time ago.

@zoulasc zoulasc closed this as completed Jan 22, 2019
@glensc
Copy link
Member

glensc commented Jan 22, 2019

not really, #4 never finished

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