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

Find libdiscid in current folder for linux/unix #14

Closed
JonnyJD opened this issue Feb 19, 2013 · 2 comments
Closed

Find libdiscid in current folder for linux/unix #14

JonnyJD opened this issue Feb 19, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@JonnyJD
Copy link
Owner

JonnyJD commented Feb 19, 2013

On Windows and Darwin finding libdiscid in the current folder works fine, but on Linux/Unix we have to use ./libdiscid.*

Problem found on a sunos5 machine (sys.platform) without root access (no system-wide install) and verified on linux.

We have to make sure that the general detection still works, of course.

@JonnyJD
Copy link
Owner Author

JonnyJD commented Feb 19, 2013

This blocks #16

@ghost ghost assigned JonnyJD Feb 19, 2013
@JonnyJD
Copy link
Owner Author

JonnyJD commented Feb 20, 2013

On Linux find_library finds a system-wide library and returns the (base) filename.
./libdiscid.so.0 is needed to access the file in the current folder ("local") (on a probably "standard" setup).

On Darwin find_library will give a full path if it finds a system-wide library, but will also find a local library already.
(installing libdiscid per cmake with sudo make install works fine, by the way)
Local libraries don't need ./ prepended, and the current folder is already preferred!

On Windows find_library will find the library (given actual file names) in the Windows system32 folder/PATH and give the full path. It also finds a library in the current folder (and gives the filename), but system-wide is preferred.
Local libraries don't need .\ prepended, but both .\ and ./ prepended work.

On Cygwin find_library finds the library system-wide (with "discid", found when in /usr/local/bin/) and returns the (base) filename. find_library will also find a "local" library and will prefer it. Libdiscid's cmake make install will install into /usr/local/lib, which is not found by cygwin.
However, ./cygdiscid-0.dll and .\cycdiscid-0.dll still find a system-wide library, but only when no local library is found.

sunos5 needs ./ prepended. No further testing available.

BSD was not tested, but I guess they work the same as Linux and SunOS.

See also:
http://docs.python.org/2/library/ctypes.html#finding-shared-libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant