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

Fix build on debian, add -fPIC to TLSF target #2031

Merged
merged 3 commits into from
May 8, 2016

Conversation

danstowell
Copy link
Member

Thanks Felipe Sateler (debian multimedia team) for diagnosing this. This patch fixes build failure of SuperCollider 3.7 on debian.

The error looks like this fwiw:

/usr/bin/ld: ../../external_libraries/libtlsf.a(tlsf.c.o): relocation
R_X86_64_32S against `.rodata' can not be used when making a shared
object; recompile with -fPIC
../../external_libraries/libtlsf.a: error adding symbols: Bad value

Thanks Felipe Sateler (debian multimedia team)
@danstowell danstowell modified the milestone: 3.7.2 May 6, 2016
@timblechmann
Copy link
Contributor

will break msvc builds. in general it is better to rely on cmake to do the compiler abstraction. most of the sc/cmake codebase could be drastically simplified (reducing the maintenance overhead in the long term) by dropping support for ancient cmake versions.

@danstowell
Copy link
Member Author

Oops - now fixed with a check, thanks.

Your point about the more modern approach is good - but we can't do that in the 3.7 branch, it would be a massive disruption. It'd be good to do that in the master branch. (For clarity: I'm proposing this for the 3.7 branch here, because it's 3.7.x that is currently failing to build on some debian systems.)

@timblechmann
Copy link
Contributor

@danstowell
Copy link
Member Author

Ah Tim thank you! And sorry - I had assumed that it couldn't possibly be pre-3.0. Given your comments, would I be right to believe that the linux check is not needed if doing it that way?

@timblechmann
Copy link
Contributor

@danstowell exacly: it will set compiler-specific flags according to the intended semantics (also in this case, the flag is not really linux-specific, but gcc-specific).
fwiw, the more recent the cmake version will get, the more one can specify on a semantic level instead of adding command-line flags. usually i recommend the latest version as people usually have better things to do than checking which parts are supported and which not.

fwiw, if debian ships ancient cmake versions, it would not be totally absurd to bundle a recent cmake with sc and build it in a bootstrap step (boost does this with it's own build-tool boost.build for example).

@danstowell
Copy link
Member Author

Thanks. No, debian is fine - not too ancient - what I meant is that we don't want to do anything to the 3.7 branch that changes the minimum required cmake version for sc

@crucialfelix crucialfelix merged commit 4cf6b41 into 3.7 May 8, 2016
@mossheim mossheim deleted the topic/37_debian_build_fix branch January 15, 2017 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants