Menu

#539 ngspice 34: ngsconvert cannot be built

v1.0 (example)
closed-fixed
None
5
2021-02-13
2021-02-01
No

with --enable-oldapps option, with ngspice-34 tarball, ngsconvert fails to build with
multiple definition:

/bin/sh ../libtool  --tag=CC   --mode=link gcc -static -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/blt -fopenmp  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -o ngsconvert ngsconvert.o frontend/com_history.lo frontend/libfte.la frontend/parser/libparser.la maths/misc/libmathmisc.la misc/libmisc.la -lncurses -lm -lfreetype -lfontconfig   -lstdc++ -lfftw3 -lreadline  -lXaw -lXmu -lXt -lXext -lX11 -lXft -lfontconfig -lXrender -lfreetype  -lSM -lICE     
libtool: link: gcc -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/blt -fopenmp -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o ngsconvert ngsconvert.o frontend/com_history.o  frontend/.libs/libfte.a frontend/parser/.libs/libparser.a maths/misc/.libs/libmathmisc.a misc/.libs/libmisc.a -lncurses -lm -lstdc++ -lfftw3 -lreadline -lXaw -lXmu -lXt -lXext -lX11 -lXft -lfontconfig -lXrender -lfreetype -lSM -lICE -fopenmp
/bin/ld: options.o (symbol from plugin): in function `cp_enqvar':
(.text+0x0): multiple definition of `cp_enqvar'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: options.o (symbol from plugin): in function `cp_enqvar':
(.text+0x0): multiple definition of `cp_usrvars'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: options.o (symbol from plugin): in function `cp_enqvar':
(.text+0x0): multiple definition of `cp_usrset'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: options.o (symbol from plugin): in function `cp_enqvar':
(.text+0x0): multiple definition of `ft_stricterror'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: spiceif.o (symbol from plugin): in function `if_dump':
(.text+0x0): multiple definition of `if_errstring'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: vectors.o (symbol from plugin): in function `vec_remove':
(.text+0x0): multiple definition of `vec_get'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: control.o (symbol from plugin): in function `cp_cwait':
(.text+0x0): multiple definition of `cp_evloop'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: control.o (symbol from plugin): in function `cp_cwait':
(.text+0x0): multiple definition of `cp_popcontrol'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: control.o (symbol from plugin): in function `cp_cwait':
(.text+0x0): multiple definition of `cp_pushcontrol'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_err'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_in'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_out'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_curin'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_curout'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_curerr'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: streams.o (symbol from plugin): in function `cp_redirect':
(.text+0x0): multiple definition of `cp_debug'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: terminal.o (symbol from plugin): in function `ourbuf':
(.text+0x0): multiple definition of `out_init'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: terminal.o (symbol from plugin): in function `ourbuf':
(.text+0x0): multiple definition of `out_send'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: terminal.o (symbol from plugin): in function `ourbuf':
(.text+0x0): multiple definition of `out_printf'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: cpitf.o (symbol from plugin): in function `ft_cpinit':
(.text+0x0): multiple definition of `cp_doquit'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: miscvars.o (symbol from plugin): in function `ft_setkwords':
(.text+0x0): multiple definition of `ft_parsedb'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: com_alias.o (symbol from plugin): in function `cp_aliases':
(.text+0x0): multiple definition of `cp_doalias'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: circuits.o (symbol from plugin): in function `ft_newcirc':
(.text+0x0): multiple definition of `ft_curckt'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: complete.o (symbol from plugin): in function `cp_ccom':
(.text+0x0): multiple definition of `cp_ccom'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: complete.o (symbol from plugin): in function `cp_ccom':
(.text+0x0): multiple definition of `cp_ccon'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
/bin/ld: complete.o (symbol from plugin): in function `cp_ccom':
(.text+0x0): multiple definition of `cp_nocc'; ngsconvert.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1175: ngsconvert] Error 1

Discussion

  • Wolfgang Walthes

    I just wanted to compile the new ngspice-34 and faced the same issue.
    In addition to the multiple definition messages I get a huge number of undefined references (see examples below):

    inpcom.c:(.text+0x6c4): undefined reference to INPevaluate' /usr/bin/ld: inpcom.c:(.text+0x744): undefined reference toINPevaluate'
    ...
    ...
    /usr/bin/ld: misc/.libs/libmisc.a(ivars.o): in function ivars': ivars.c:(.text+0x8f): undefined reference toSpice_Lib_Dir'
    /usr/bin/ld: ivars.c:(.text+0xb7): undefined reference to Spice_Lib_Dir' /usr/bin/ld: ivars.c:(.text+0xd8): undefined reference toSpice_Lib_Dir'
    /usr/bin/ld: ivars.c:(.text+0xf9): undefined reference to Spice_Lib_Dir' /usr/bin/ld: ivars.c:(.text+0x11a): undefined reference toSpice_Exec_Dir'
    /usr/bin/ld: ivars.c:(.text+0x188): undefined reference to Spice_Host' /usr/bin/ld: ivars.c:(.text+0x1a2): undefined reference toBug_Addr'
    /usr/bin/ld: ivars.c:(.text+0x1b5): undefined reference to Def_Editor' /usr/bin/ld: ivars.c:(.text+0x1e4): undefined reference toAsciiRawFile'
    collect2: error: ld returned 1 exit status
    make[2]: *** [Makefile:1123: ngsconvert] Fehler 1
    make[2]: *** Auf noch nicht beendete Prozesse wird gewartet …
    make[1]: *** [Makefile:1451: all-recursive] Fehler 1
    make: *** [Makefile:501: all-recursive] Fehler 1

    A short test with the ngspice-33 using same ./configuration command was still successful.
    Something changed from ngspice-33 to ngspice-34.

     
  • Holger Vogt

    Holger Vogt - 2021-02-07

    Yes, something has changed, I have no simple solution right now. Since the old apps are deprecated, please compile without --enable-oldapps. If I find a simple solution to this bug, then o.k. If not, I will remove the old apps in the next release.

     
  • Holger Vogt

    Holger Vogt - 2021-02-09

    I have uploaded a fix to branch pre-master.

    Unfortunately the capability to compile ngsconvert is extremely sensitive to changes in
    associated files as found in makefile.am and may easily be broken again next time. Requires manual tweaking.

     
  • Holger Vogt

    Holger Vogt - 2021-02-10
    • status: open --> closed-fixed
    • assigned_to: Holger Vogt
     
  • Wolfgang Walthes

    Works quite well.
    Thanks a lot !

     

Log in to post a comment.

MongoDB Logo MongoDB