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

fastcall doesn't install on Travis, ref #16

Open
tiangolo opened this issue Apr 26, 2017 · 10 comments
Open

fastcall doesn't install on Travis, ref #16

tiangolo opened this issue Apr 26, 2017 · 10 comments

Comments

@tiangolo
Copy link
Contributor

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 #7

@unbornchikken
Copy link
Member

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.

@tiangolo
Copy link
Contributor Author

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

@unbornchikken
Copy link
Member

Attempt 1. should work. I don't see my suggested changes in your repo. Would you try that way?

@tiangolo
Copy link
Contributor Author

tiangolo commented May 5, 2017

It's here (in a feature/travis branch):

Here's the line with the changes of attempt 1.

@unbornchikken
Copy link
Member

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: travis-ci/travis-ci#4631 (comment)

@unbornchikken
Copy link
Member

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.

@tiangolo
Copy link
Contributor Author

tiangolo commented May 8, 2017

Cool! Let me try it.


Thanks for the offering! It sounds great :) Let me work on it.

@tiangolo
Copy link
Contributor Author

tiangolo commented May 8, 2017

That did it! All green! ✅ 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.

@unbornchikken
Copy link
Member

So, let's wait for Travis to run all tests, and see if it gets ready for make it into a new release.

@unbornchikken
Copy link
Member

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.

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

2 participants