Menu

#492 --enable-xspice --enable-oldapps fals to compile with 32

v1.0 (example)
closed-fixed
None
5
2020-05-05
2020-05-05
No

When compiling ngspice-32 with --enable-xspice --enable-oldapps, ngnutmeg binary fails to compile:

  • Firstly:
gcc -DHAVE_CONFIG_H   -I. -I. -I../src/include -I../src/include -I../src/spicelib/devices  -I/usr/include/freetype2 -DUSE_INTERP_RESULT -static -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/include/blt -fopenmp -MT ngnutmeg-main.o -MD -MP -MF .deps/ngnutmeg-main.Tpo -c -o ngnutmeg-main.o `test -f 'main.c' || echo './'`main.c
main.c:424:1: error: conflicting types for 'load_opus'
  424 | load_opus(char *name)
      | ^~~~~~~~~
In file included from main.c:38:
spicelib/devices/dev.h:11:5: note: previous declaration of 'load_opus' was here
   11 | int load_opus(const char *);
      |     ^~~~~~~~~
make[2]: *** [Makefile:1324: ngnutmeg-main.o] Error 1
  • Even after fixing the above error by changing the above line in main.c to int load_opus(const char *), final linking fails as:
/bin/ld: frontend/.libs/libfte.a(vectors.o): in function `plot_setcur':
/home/mtasaka/rpmbuild/fedora-specific/ngspice/master/ngspice-32/src/frontend/vectors.c:1175: undefined reference to `EVTswitch_plot'
/bin/ld: /home/mtasaka/rpmbuild/fedora-specific/ngspice/master/ngspice-32/src/frontend/vectors.c:1143: undefined reference to `EVTswitch_plot'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1163: ngnutmeg] Error 1

I am trying to fix this error, however it seems the latter linking issue is a bit harder.

Discussion

  • Mamoru TASAKA

    Mamoru TASAKA - 2020-05-05

    Note that there are some other issues with gcc10, which defaults to "-fno-common", so there are some "multiple definition of foo" messages, however I cannot submit patches for the issue unless the above linkage error issue is resolved.

     
  • Holger Vogt

    Holger Vogt - 2020-05-05

    In main.c, where you have just added the missing 'const', place a

    int
    EVTswitch_plot(CKTcircuit* ckt, const char* plottypename)
    {
        NG_IGNORE(ckt);
        NG_IGNORE(plottypename);
        return 1;
    };
    

    close by.

     

    Last edit: Holger Vogt 2020-05-05
  • Mamoru TASAKA

    Mamoru TASAKA - 2020-05-05

    Confirmed that this issue is fixed by db91e19e36822432156029d240ed272f56cac010 . Thank you.

     
  • Holger Vogt

    Holger Vogt - 2020-05-05
    • status: open --> closed-fixed
    • assigned_to: Holger Vogt
     
  • Holger Vogt

    Holger Vogt - 2020-05-05

    fix uploaded to master branch

     

Log in to post a comment.

MongoDB Logo MongoDB