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

Link against lua correctly #6311

Closed
wants to merge 1 commit into from
Closed

Conversation

pikajude
Copy link
Contributor

Only liblua.5.2.3.dylib is produced on Darwin and as far as I can tell this solution should work for Linux too

@copumpkin
Copy link
Member

Any idea why they differ? On pure-darwin, lua works fine.

@pikajude
Copy link
Contributor Author

No, this commit changes lua's pkg-config file to correctly build packages that depend on lua

@copumpkin
Copy link
Member

Makes sense!

@lucabrunox
Copy link
Contributor

Makes sense but is it needed in nix? What problem did you have?

@pikajude
Copy link
Contributor Author

"ld: library not found for -llua" which makes sense since the pkg-config file instructs users to link with liblua.dylib which does not exist.

@lucabrunox
Copy link
Contributor

@joelteon not sure, but In principle I'd make liblua.dylib a symlink like it's done on linux.

@copumpkin
Copy link
Member

Yeah, not clear why it isn't done automatically. Perhaps just an upstream
bug? It's not as if -llua would work outside of Nix either, and it's pretty
rare to see people explicitly putting versions in their library parameters.

On Thursday, February 12, 2015, lethalman notifications@github.com wrote:

@joelteon https://github.com/joelteon not sure, but In principle I'd
make liblua.dylib a symlink like it's done on linux.


Reply to this email directly or view it on GitHub
#6311 (comment).

@pikajude
Copy link
Contributor Author

The lua build system produces non-numbered object files on Linux, just not on Darwin.

@domenkozar domenkozar added the 6.topic: darwin Running or building packages on Darwin label Feb 13, 2015
@copumpkin
Copy link
Member

@joelteon I understand that it differs; mostly just trying to get at "why is it different"/"does it need to be"? For example, let's say I write a library down the line that links against lua: do I need to always use pkg-config? Do I need to be aware of numbers on my dylib? I'm pretty sure most things link against it just with -llua, and I'd say that if the darwin build of lua doesn't produce something that can work with that, it's probably broken.

Another way to look at it is that version numbers of any sort don't really belong in a derivation's output, at least not in a way that affects functionality.

@mbrgm
Copy link
Member

mbrgm commented Apr 22, 2015

What's holding this back from being merged?

@zimbatm
Copy link
Member

zimbatm commented Feb 26, 2016

Is this still an issue on Darwin ? Rebase this branch on top of master gives me 0 commits.

@garbas
Copy link
Member

garbas commented Jul 21, 2016

@pikajude ping

@joachifm
Copy link
Contributor

This was also done in 330836a but then reverted in c7ed090 without explanation.

@domenkozar
Copy link
Member

What's up with this? @copumpkin

@joachifm
Copy link
Contributor

joachifm commented Mar 8, 2017

Is this still relevant?

@vcunat
Copy link
Member

vcunat commented Mar 9, 2017

Ugh, it seems so:

-r-xr-xr-x 1 root root 190576 Jan  1  1970 liblua.5.2.3.dylib
lrwxrwxrwx 1 root root     13 Jan  1  1970 liblua.dylib -> liblua..dylib
lrwxrwxrwx 1 root root     18 Jan  1  1970 liblua..dylib -> liblua.5.2.3.dylib
dr-xr-xr-x 1 root root     12 Jan  1  1970 pkgconfig

@vcunat
Copy link
Member

vcunat commented Mar 9, 2017

Actually, I think it's not required anymore as liblua.dylib symlink resolves OK, even though it's not perfect.

@vcunat
Copy link
Member

vcunat commented Mar 9, 2017

The symlink names should be OK after d56e596.

vcunat added a commit that referenced this pull request Mar 9, 2017
@zimbatm
Copy link
Member

zimbatm commented Mar 10, 2017

Looks good! (tested on Darwin)

@zimbatm zimbatm closed this Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants