Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79913
| References | (1 earlier) <nad-150419.13393227102014@news.gmane.org> <CAHu5PrY-T=DT3wOg-Y+Va9WgwBV3w9d7M-tu=_N-CNgWsSzGpg@mail.gmail.com> <nad-939726.01114928102014@news.gmane.org> <CAHu5Pra68EDgkvFYHTQ+SrmB6syew9A1SAbB5CEmLuzqbs5vQg@mail.gmail.com> <nad-E45689.14013428102014@news.gmane.org> |
|---|---|
| Date | 2014-10-29 09:02 -0500 |
| Subject | Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py? |
| From | Cyd Haselton <chaselton@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15299.1414591357.18130.python-list@python.org> (permalink) |
On Tue, Oct 28, 2014 at 4:01 PM, Ned Deily <nad@acm.org> wrote: > In article > <CAHu5Pra68EDgkvFYHTQ+SrmB6syew9A1SAbB5CEmLuzqbs5vQg@mail.gmail.com>, > Cyd Haselton <chaselton@gmail.com> wrote: > >> On Tue, Oct 28, 2014 at 3:11 AM, Ned Deily <nad@acm.org> wrote: >> > In article >> > <CAHu5PrY-T=DT3wOg-Y+Va9WgwBV3w9d7M-tu=_N-CNgWsSzGpg@mail.gmail.com>, >> > Cyd Haselton <chaselton@gmail.com> wrote: >> > [...] >> >> I'm building python on an Android device in the KBOX >> >> environment...which simulates a Unix type filesystem. >> >> Python isn't installed; I'm building from sources (2.7.8) with GCC >> >> 4.8.0 and make. >> >> >> >> The problem with the LDFLAGS approach is that some of the libraries >> >> that must be linked (-lc -ldl) do not need the --allow-shlib-undefined >> >> option...it's only the lpython2.7 that does. Any way to do this? >> > >> > Sorry, I have no experience with that environment nor an understanding >> > of why you need to specify --allow-shlib-undefined (it seems to be the >> > default in some versions of ld). You could look at and, if necessary, >> > modify Lib/distutils, the part of the Python standard library that >> > builds extension modules from setup.py. > >> No need to apologize. Also no need to have an understanding of the >> environment; with a few rare exceptions it behaves just like a >> Unix/Linux one. >> >> The reason why I need to specify --allow-shlib-undefined is for the >> python library; it's throwing undefined references to sincos even >> though the symbol is there. Specifying that option is the only fix >> I've found. >> >> As mentioned earlier, i'm not familiar with python or its build >> system; which file in the distutils dir do I need to modify? > > Perhaps I should apologize for not asking earlier what you are really > trying to do before suggesting heading down the path of modifying > Distutils :) So the issue is with an undefined reference to sincos? It > appears that that routine is often supplied in libm. Is that the case > on your platform? Yes it is. > And, if so, the right fix might be to supply it > manually or, better, ensure that Python supplies it as a result of > running ./configure. If the Makefile generated is a result of running ./configure, then Python is indeed finding the library...what it is doing with it after finding it may be something else entirely. I've tried everything from adding the -Wl,--no-allow-shlib-undefined option to adding #include <math.h> to the complexobject.c code...I still get an undefined reference to sincos. Running grep "sincos" libpython2.7.* turns up the offending symbol (function? declaration?) but re-running "make" after that still throws the same error. The only fix I've found is adding the -Wl,--allow-shlib-undefined before the python library...which I do by hacking the Makefile. That allows the build to continue, which it does until it hits the part where setup.py is run. > Also, what version of Python are you building? 2.7.8. I thought that it would be easier to build it on Android > > -- > Ned Deily, > nad@acm.org > > -- > https://mail.python.org/mailman/listinfo/python-list
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Build Question: How to Add -Wl, --option Before Objects In Setup.py? Cyd Haselton <chaselton@gmail.com> - 2014-10-29 09:02 -0500
csiph-web