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

--enable-shared fails on Solaris 9 with gcc-3.2.3 #38599

Closed
dr2048 mannequin opened this issue Jun 6, 2003 · 9 comments
Closed

--enable-shared fails on Solaris 9 with gcc-3.2.3 #38599

dr2048 mannequin opened this issue Jun 6, 2003 · 9 comments
Assignees
Labels
build The build process and cross-build

Comments

@dr2048
Copy link
Mannequin

dr2048 mannequin commented Jun 6, 2003

BPO 749911
Nosy @loewis
Files
  • makefile.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/loewis'
    closed_at = <Date 2003-06-14.15:47:01.000>
    created_at = <Date 2003-06-06.01:21:53.000>
    labels = ['build']
    title = '--enable-shared fails on Solaris 9 with gcc-3.2.3'
    updated_at = <Date 2003-06-14.15:47:01.000>
    user = 'https://bugs.python.org/dr2048'

    bugs.python.org fields:

    activity = <Date 2003-06-14.15:47:01.000>
    actor = 'loewis'
    assignee = 'loewis'
    closed = True
    closed_date = None
    closer = None
    components = ['Build']
    creation = <Date 2003-06-06.01:21:53.000>
    creator = 'dr2048'
    dependencies = []
    files = ['911']
    hgrepos = []
    issue_num = 749911
    keywords = []
    message_count = 9.0
    messages = ['16268', '16269', '16270', '16271', '16272', '16273', '16274', '16275', '16276']
    nosy_count = 2.0
    nosy_names = ['loewis', 'dr2048']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue749911'
    versions = []

    @dr2048
    Copy link
    Mannequin Author

    dr2048 mannequin commented Jun 6, 2003

    ./confgiure --enable-shared
    make
    fails on Solaris 9 with gcc 3.2.3

        gcc -shared -o libpython2.3.so
    

    Modules/getbuildinfo.o
    Parser/acceler.o Parser/grammar1.o
    Parser/listnode.o
    Parser/node.o Parser/parser.o Parser/parsetok.o
    Parser/bitset.o Parser/metagrammar.o
    Parser/firstsets.o
    Parser/grammar.o Parser/pgen.o Parser/myreadline.o
    Parser/tokenizer.o Objects/abstract.o
    Objects/boolobject.o
    Objects/bufferobject.o Objects/cellobject.o
    Objects/classobject.o Objects/cobject.o
    Objects/complexobject.o Objects/descrobject.o
    Objects/enumobject.o Objects/fileobject.o
    Objects/floatobject.o Objects/frameobject.o
    Objects/funcobject.o Objects/intobject.o
    Objects/iterobject.o
    Objects/listobject.o Objects/longobject.o
    Objects/dictobject.o
    Objects/methodobject.o Objects/moduleobject.o
    Objects/object.o
    Objects/obmalloc.o Objects/rangeobject.o
    Objects/sliceobject.o
    Objects/stringobject.o Objects/structseq.o
    Objects/tupleobject.o Objects/typeobject.o
    Objects/weakrefobject.o Objects/unicodeobject.o
    Objects/unicodectype.o Python/bltinmodule.o
    Python/exceptions.o Python/ceval.o Python/compile.o
    Python/codecs.o Python/errors.o Python/frozen.o
    Python/frozenmain.o Python/future.o
    Python/getargs.o
    Python/getcompiler.o Python/getcopyright.o
    Python/getmtime.o
    Python/getplatform.o Python/getversion.o
    Python/graminit.o
    Python/import.o Python/importdl.o Python/marshal.o
    Python/modsupport.o Python/mystrtoul.o
    Python/mysnprintf.o
    Python/pyfpe.o Python/pystate.o Python/pythonrun.o
    Python/structmember.o Python/symtable.o
    Python/sysmodule.o
    Python/traceback.o Python/getopt.o
    Python/dynload_shlib.o
    Python/thread.o Modules/config.o Modules/getpath.o
    Modules/main.o Modules/gcmodule.o
    Modules/threadmodule.o
    Modules/signalmodule.o Modules/posixmodule.o
    Modules/errnomodule.o Modules/_sre.o
    Modules/_codecsmodule.o
    Modules/zipimport.o Modules/symtablemodule.o
    Modules/xxsubtype.o -lsocket -lnsl -lrt -ldl
    -lpthread -lm;
    \
    fi
    ld: warning: option -o appears more than once, first
    setting taken
    ln: libpython2.3.so and libpython2.3.so are identical
    make: *** [libpython2.3.so] Error 2

    running make again produces:
    c++ -o python \
    Modules/python.o \

    -Wl,-rpath,/home/faculty/dreed/pub/Python-2.3/lib
    -L. -lpython2.3 -lsocket -lnsl -lrt -ldl
    -lpthread -lm
    ld: fatal: option -dn and -P are incompatible
    ld: fatal: Flags processing errors
    collect2: ld returned 1 exit status
    make: *** [python] Error 1

    @dr2048 dr2048 mannequin closed this as completed Jun 6, 2003
    @dr2048 dr2048 mannequin assigned loewis Jun 6, 2003
    @dr2048 dr2048 mannequin added the build The build process and cross-build label Jun 6, 2003
    @dr2048 dr2048 mannequin closed this as completed Jun 6, 2003
    @dr2048 dr2048 mannequin assigned loewis Jun 6, 2003
    @dr2048 dr2048 mannequin added the build The build process and cross-build label Jun 6, 2003
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=21627

    Please try the attached patch and report whether this solves
    the problem.

    @dr2048
    Copy link
    Mannequin Author

    dr2048 mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=795169

    That gets past the first problem. Now during the initial
    compile, I get:

    c++ -o python \
    Modules/python.o \

    -Wl,-rpath,/home/faculty/dreed/pub/Python-2.3/lib -L.
    -lpython2.3 -lsocket -lnsl -lrt -ldl -lpthread -lm
    ld: fatal: option -dn and -P are incompatible
    ld: fatal: Flags processing errors
    collect2: ld returned 1 exit status
    make: *** [python] Error 1

    I can't find those flags in the Makefile to try removing one
    of them.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=21627

    Committed as Makefile.pre.in 1.131.

    Can you please add -v to the linker line, and report how the
    linker is being invoked?

    Can you also try to replace -rpath with -R?

    This very line works fine on my copy of Solaris 9, so I'm
    uncertain what the problem is.

    @dr2048
    Copy link
    Mannequin Author

    dr2048 mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=795169

    I found the rpath line in the Makefile and replaced it with -R
    I can't seem to find the ld line in the Makefile.

    I noticed that I actually did get a libpython2.3.so file
    created even though
    I got the errors, but I couldn't complete a make install
    because of the errors

    I'm trying again now with the -R line.

    If you want to contact me via email at "dreed at
    capital.edu", it might
    be easier to work through these problems using email or IM
    at some time
    that we're both available. Thanks!

    @dr2048
    Copy link
    Mannequin Author

    dr2048 mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=795169

    The makefile patch and changing -rpath to -R got it to
    compile, but
    when I try to execute python I get:

    python
    ld.so.1: python: fatal: relocation error: file
    ./libpython2.3.so: symbol rl_complete: referenced symbol not
    found
    Killed

    what version of gcc are you using to compile it on Solaris 9?

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=21627

    I use gcc 3.2.2. I don't see the problem with -rpath as I
    use GNU ld, not /usr/ccs/bin/ld. I don't see the problem
    with rl_complete because I don't have readline. To fix this
    problem, invoke

    crle -u -l <directory where libreadline.so is located>

    DO READ THE MAN PAGE OF crle BEFORE INVOKING THIS COMMAND.

    I have committed the change from -rpath to -R as

    configure 1.406
    configure.in 1.417

    Closing this report as fixed.

    @dr2048
    Copy link
    Mannequin Author

    dr2048 mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=795169

    I don't have root access on this machine so I won't try the
    crle command.

    I just installed gcc 3.2 and am trying to get Python and
    Postgresql compiled with it. readline is compiled with gcc
    2.95 so I'll bet that's the problem. I'll recompile readline
    or edit Modules/Setup or see if there's a configure option
    to disable readline.

    Thanks for all your help.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 14, 2003

    Logged In: YES
    user_id=21627

    You'll lose your bet :-)

    The problem is not that readline is compiled with gcc, but
    that it is in a location where ld.so.1 does not look. You can
    a) set LD_RUN_PATH
    b) set LD_LIBRARY_PATH
    c) add more -R options to the linker
    d) build readline statically, and link the readline module
    statically through Modules/Setup.

    See ld.so.1(1)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants