[pycrypto] Linking Against Non-Sytem libgmp
Kristofer.Wempa at sig.com
Mon Apr 21 13:40:03 PDT 2014
> Since the libgmp on our Linux server (SLES11SP2) has a known vulnerability
> , I'm trying to build pycrypto against the latest libgmp that I have installed
> in an alternate location and have the run path set so that it picks up the
> alternate libgmp without having to set LD_LIBRARY_PATH. First, I tried
> modifying include_dirs, library_dirs and runtime_library_dirs in the setup.py.
> When that didn't work, I tried only setting CFLAGS/CPPFLAGS/LDFLAGS
> environment variables. Neither worked. In both cases, I see my compiler
> and linker flags on the command lines, but because "-L/usr/lib64 -L/lib64"
> always appears first, the library is linked against the system libgmp and not
> the alternate one. At this point, my only solution is to build the _fastmath.so
> and then re-run the link command without the "-L/usr/lib64 -L/lib64"
> arguments. Isn't there a cleaner way to accomplish what I need ? Why don't
> my LDFLAGS appear first on the link line ? Any help would be appreciated.
> Thank you.
Please disregard my posting. I only see this behavior in Python 2.7.5, so it's either the Python package or the version of distribute/setuptools that is shipped with that specific Python version. I tried building against a different libgmp with other Python 2.7.X versions and none of them are prepending those system libraries to the link line.
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
More information about the pycrypto