fastcall
fastcall copied to clipboard
fastcall doesn't install on Travis, ref
I'm trying to build something (active-win ) that uses fastcall
on Travis. But I'm getting an error.
So I tried to fork fastcall
and start setting up Travis for it, but I'm getting the same error.
Here's the line with the error:
https://travis-ci.org/tiangolo/fastcall/jobs/226075410#L492
/usr/bin/ld: CMakeFiles/ref.dir/__/ref/src/binding.cc.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
I tried setting up some environment variables and modifying the CMakeLists.txt
, but I'm not an expert in C
/ C++
, so I'm not really sure what to try.
Do you have any insights on what could be happening?
BTW, this should help in direction of https://github.com/cmake-js/fastcall/issues/7
Hey, thanks for trying to make fastcall to work with Travis. Since I don't have any working prototype, please try the following on yours:
Attempt 1 - change the line on the bottom of deps/ref-cmake/CMakeLists.txt
to:
set_target_properties(
ref
PROPERTIES
PREFIX ""
SUFFIX ".node"
POSITION_INDEPENDENT_CODE ON)
If it's not working then:
Attempt 2 - add this to fastcall's root CMakeListst.txt to the top of the elseif(UNIX)
branch:
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Hope it helps. And if it is, then please put on a small PR from this, I'm gonna make it into a release ASAP.
Hmm, it didn't work. I even tried with both changes...
https://travis-ci.org/tiangolo/fastcall/jobs/226450862
Do you have any ideas?
BTW, in case you want to check the code, my branch is here: https://github.com/tiangolo/fastcall/tree/feature/travis
Attempt 1. should work. I don't see my suggested changes in your repo. Would you try that way?
Ok, I think I've found it. You gotta go with CMake 2.8.9+.
addons:
apt:
sources:
- george-edison55-precise-backports
packages:
- cmake
- cmake-data
Form there: https://github.com/travis-ci/travis-ci/issues/4631#issuecomment-191153634
Side note: would you like to join to fastcall as collaborator? Your travis feature branch is a nice promo. I would be really appreciated if you could make a PR to land.
Cool! Let me try it.
Thanks for the offering! It sounds great :) Let me work on it.
That did it! All green! :white_check_mark: https://travis-ci.org/tiangolo/fastcall/builds/230019588
Let me try removing the code from attempt 1 and 2 to see what is actually necessary. Then I'll create the PR.
So, let's wait for Travis to run all tests, and see if it gets ready for make it into a new release.
I have not forgotten this, but I'm very tight on schedule right now. I'll get back to it as soon as I can, sorry.