Menu

#143 cannot compile under mingw

v1.0_(example)
open
nobody
None
1
2024-02-21
2019-10-29
Querino
No

i get errors when i try to compile it under mingw.

first, i got a "qprintf.o:qprintf.c:(.text+0x6f): undefined reference to 'GifErrorString'"

i "fixed" that one, now i'm stuck at "libgif.a: error adding symbols: Archive has no index; run ranlib to add one"

now i give up.

btw, the " horrible old autoconf build system" always worked fine...

Discussion

  • Querino

    Querino - 2019-10-29

    nevermind, got it somehow working under cygwin

     
  • Eric S. Raymond

    Eric S. Raymond - 2024-02-17
    • status: open --> closed
     
  • Gerrit M. Albrecht

    The GifErrorString error is still there...

    $ make
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o dgif_lib.o dgif_lib.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o egif_lib.o egif_lib.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o gifalloc.o gifalloc.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o gif_err.o gif_err.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o gif_font.o gif_font.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o gif_hash.o gif_hash.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o openbsd-reallocarray.o openbsd-reallocarray.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -m32 -pipe -L/pjiu/lib -Wl,-soname -Wl,libgif.so.7 -o libgif.so dgif_lib.o egif_lib.o gifalloc.o gif_err.o gif_font.o gif_hash.o openbsd-reallocarray.o
    ar rcs libgif.a dgif_lib.o egif_lib.o gifalloc.o gif_err.o gif_font.o gif_hash.o openbsd-reallocarray.o
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o qprintf.o qprintf.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o quantize.o quantize.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -I/pjiu/include  -c -o getarg.o getarg.c
    cc -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -m32 -pipe -L/pjiu/lib -Wl,-soname -Wl, -o libutil.so qprintf.o quantize.o getarg.o
    D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: SONAME must not be empty string; ignored
    D:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/13.2.0/../../../../i686-w64-mingw32/bin/ld.exe: qprintf.o:qprintf.c:(.text+0xad): undefined reference to `GifErrorString'
    collect2.exe: error: ld returned 1 exit status
    make: *** [Makefile:112: libutil.so] Fehler 1
    

    Using MSYS2/MinGW gcc 13.2.0 Updated the old patch from v5.2.1 to 5.2.2 and added it here.

     

    Last edit: Gerrit M. Albrecht 2024-02-20
  • Eric S. Raymond

    Eric S. Raymond - 2024-02-21
    • status: closed --> open
     
  • Eric S. Raymond

    Eric S. Raymond - 2024-02-21

    I can't accept this patch. it breaks generration of .so files.

    Can you ship a conditionalized verrsion that detects mingw and does the right thing withour disturbing the GCC 10 build?

     

Log in to post a comment.