-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 FreeBSD linking issues #2560
Conversation
@myfreeweb I unfortunately know nothing about FreeBSD. @ysbaddaden if you think this is good you can merge it. You can freely choose what to do with stuff related to FreeBSD :-) |
# where the default cc doesn't use /usr/local/lib by default | ||
library_path.each do |path| | ||
flags << " -L#{path}" | ||
end |
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.
@asterite are you OK with this change?
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.
Hmmm... not sure. Could it only be done if the target platform is freebsd? I don't know if that could break something.
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.
Maybe? But I don't think adding -L/usr/lib -L/usr/local/lib
can break anything anywhere… Do people not add this to all linker invocations?
@myfreeweb Could you rebase so that we get another Travis run? For some reason it didn't trigger. |
On FreeBSD, the default cc compiler does not have /usr/local/lib in its default library path. Usually pkg-config adds it.
Looks okay to me and easy to spot in case it breaks somewhere. Let's make it platform specific once we find a setup that it does break. Thank you! |
This PR:
LIBRARY_PATH
to/lib:/usr/lib:/usr/local/lib
from @ysbaddaden's FreeBSD instructions.libm
linking on FreeBSD — examples likeneural_net
now work.redefine_main
thing is for OS X — on FreeBSD, it breaks everything, but the examples work without it).