-
Notifications
You must be signed in to change notification settings - Fork 47
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 without .la files #85
Conversation
Many distros do no ship .la files which breaks the build and additionally when using slibtool instead of GNU libtool the .la files are not installed by default. This fixes the build to use the linker flags -lcolm and -lfsm instead.
Upstream-PR: adrian-thurston/ragel#85 Signed-off-by: orbea <orbea@riseup.net>
Upstream-PR: adrian-thurston/ragel#85 Signed-off-by: orbea <orbea@riseup.net>
Upstream-PR: adrian-thurston/ragel#85 Bug: https://bugs.gentoo.org/820260 Bug: https://bugs.gentoo.org/839048 Closes: https://bugs.gentoo.org/832391 Closes: #25322 Signed-off-by: orbea <orbea@riseup.net> Signed-off-by: Sam James <sam@gentoo.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this would break other build scenarios, specifically when you've got multiple versions of colm installed and need to link against a specific one. libtool
helps immensely with that.
It would be better to make this a configuration option I think.
I think a better solution would be to add at least a pkgconfig file for colm and use https://autotools.info/pkgconfig/pkg_check_modules.html Would this be acceptable for you? I can look into modifying this PR and making additional ones if desired. |
I don't understand why it would be okay to use |
pkgconfig files ( The gentoo rationale for removing them perhaps explains this better.
https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0303 |
Well, with
Both release versions fail and latest-commit ones. |
@orbea What does
|
@barracuda156 A |
@orbea I will check and update on symbols. This worked to fix the build though (adapted from your patch): https://github.com/macports/macports-ports/pull/15762/files#diff-c6e2cfc2d9c0b3700a421eac7f31fc0fb13169e54356669f00fcaa54890542a8 |
Symbols in libfsm-0.14.7.dylib on 10.5.836-249:~ svacchanda$ nm -a /opt/local/lib/libfsm-0.14.7.dylib/opt/local/lib/libfsm-0.14.7.dylib(single module): |
That's because you installed colm using MacPorts which, like Gentoo and Fink and Homebrew and others, removes .la files because they are harmful and almost always unnecessary. In the case of MacPorts, .la files are removed when installing ports on OS X 10.9 or later, whereas for OS X 10.8 and earlier .la files are kept but the harmful (There's nothing in particular about those OS versions, we just didn't want to make too many changes for existing MacPorts users, and 10.8 was the current OS version at the time, so we flipped the switch to start deleting .la files starting with the next OS version, 10.9, since in MacPorts it is understood that all users will reinstall all ports when upgrading to a new major OS version.) For MacPorts, the colm portfile could specify that it wants the .la files to be kept by setting |
@ryandesign Should we rather include pre-10.8 systems though? At the time it was understandable, but nowadays that will affect not many users, and those who do testing rebuild ports from source anyway. |
Changing the |
@ryandesign Ok, got it. That does sound like an inconvenience arguably unjustified. |
How about if |
Or maybe a configure test for the |
In 463f491 we are falling back to using AC_CHECK_LIB if no .la files are found. |
Note: I tested this against
7.0.4
.Many distros do no ship
.la
files which breaks the build and additionally when using slibtool instead of GNU libtool the.la
files are not installed by default.This fixes the build to use the linker flags
-lcolm
and-lfsm
instead.I also removed the some pointless variables.