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

libgdiplus does not compile with giflib >= 5.1.9 #546

Closed
ElDavoo opened this issue May 7, 2019 · 4 comments · Fixed by #575
Closed

libgdiplus does not compile with giflib >= 5.1.9 #546

ElDavoo opened this issue May 7, 2019 · 4 comments · Fixed by #575

Comments

@ElDavoo
Copy link

ElDavoo commented May 7, 2019

/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -pthread -Wl,-O1 -Wl,--as-needed -o testgdi testgdi.o ../src/libgdiplus.la -lm -lglib-2.0 -lcairo -lfontconfig -lfreetype -lfreetype -lXrender -lX11 -L/lib -ljpeg -ltiff -lgif -lpng -lz -lexif
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -pthread -Wl,-O1 -Wl,--as-needed -o .libs/testgdi testgdi.o ../src/.libs/libgdiplus.so -lm -lglib-2.0 -lcairo -lfontconfig -lfreetype -lXrender -lX11 -L/lib -ljpeg -ltiff -lgif -lpng -lz -lexif -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../src/.libs/libgdiplus.so: undefined reference to `GifQuantizeBuffer'
collect2: error: ld returned 1 exit status

Have a look at https://bugs.gentoo.org/682068 .

@safern
Copy link

safern commented Jun 11, 2019

cc: @akoeplinger we're hitting this in corefx as well when trying to run our tests on Fedora30 which ships with libgif7.1.

@Sembiance
Copy link

According to https://bugs.gentoo.org/682068 it says:

giflib in 5.1.9 split the libgif.so shared library into libgif.so and libutil.so and put the deprecated function (GifQuantizeBuffer) into the libutil.so.
Then the Makefile for giflib only installs libgif.so (but to be fair, they did say to stop using it around 2014)

Not sure if there are additional functions like GifQuantizeBuffer that were also removed or not.

@Joefish
Copy link

Joefish commented Jul 14, 2019

I encountered the same problem on Fedora when compiling Mesen as documented here.
I diffed the symbol table of libgif 5.1.4 and 5.1.9 and found only GifQuantizeBuffer missing.
Symbols libgif 5.1.4


Symbol table '.dynsym' contains 85 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.2.5 (2)
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.2.5 (2)
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcpy@GLIBC_2.2.5 (2)
     5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND qsort@GLIBC_2.2.5 (2)
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fread@GLIBC_2.2.5 (2)
     7: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fclose@GLIBC_2.2.5 (2)
     8: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.2.5 (2)
     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (3)
    10: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.2.5 (2)
    11: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.2.5 (2)
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND calloc@GLIBC_2.2.5 (2)
    13: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (4)
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.2.5 (2)
    16: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND realloc@GLIBC_2.2.5 (2)
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fdopen@GLIBC_2.2.5 (2)
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND open@GLIBC_2.2.5 (2)
    19: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtok@GLIBC_2.2.5 (2)
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fwrite@GLIBC_2.2.5 (2)
    21: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
    22: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.2.5 (2)
    23: 0000000000005b40    60 FUNC    GLOBAL DEFAULT   11 _InsertHashTable
    24: 0000000000004a20   909 FUNC    GLOBAL DEFAULT   11 EGifPutImageDesc
    25: 0000000000003c90   207 FUNC    GLOBAL DEFAULT   11 DGifGetLZCodes
    26: 0000000000005580   528 FUNC    GLOBAL DEFAULT   11 EGifSpew
    27: 0000000000003ac0   206 FUNC    GLOBAL DEFAULT   11 DGifGetLine
    28: 0000000000002af0   536 FUNC    GLOBAL DEFAULT   11 DGifGetScreenDesc
    29: 00000000000036d0   198 FUNC    GLOBAL DEFAULT   11 DGifGetExtension
    30: 00000000000037a0    77 FUNC    GLOBAL DEFAULT   11 DGifExtensionToGCB
    31: 0000000000005c20   160 FUNC    GLOBAL DEFAULT   11 GifMakeMapObject
    32: 00000000000030e0   278 FUNC    GLOBAL DEFAULT   11 DGifGetRecordType
    33: 00000000000037f0   140 FUNC    GLOBAL DEFAULT   11 DGifSavedExtensionToGCB
    34: 0000000000005180   166 FUNC    GLOBAL DEFAULT   11 EGifPutComment
    35: 0000000000003880   286 FUNC    GLOBAL DEFAULT   11 DGifCloseFile
    36: 0000000000004db0   122 FUNC    GLOBAL DEFAULT   11 EGifPutLine
    37: 0000000000005f30    61 FUNC    GLOBAL DEFAULT   11 GifApplyTranslation
    38: 0000000000004760    16 FUNC    GLOBAL DEFAULT   11 EGifSetGifVersion
    39: 0000000000005370   159 FUNC    GLOBAL DEFAULT   11 EGifPutCodeNext
    40: 0000000000004fa0    99 FUNC    GLOBAL DEFAULT   11 EGifPutExtensionTrailer
    41: 0000000000005b10    36 FUNC    GLOBAL DEFAULT   11 _InitHashTable
    42: 0000000000005940   428 FUNC    GLOBAL DEFAULT   11 GifDrawBoxedText8x8
    43: 0000000000003c60    45 FUNC    GLOBAL DEFAULT   11 DGifGetCode
    44: 00000000000050b0   206 FUNC    GLOBAL DEFAULT   11 EGifPutExtension
    45: 0000000000006120   370 FUNC    GLOBAL DEFAULT   11 GifMakeSavedImage
    46: 00000000000058c0   117 FUNC    GLOBAL DEFAULT   11 GifDrawRectangle
    47: 0000000000006030   117 FUNC    GLOBAL DEFAULT   11 GifFreeExtensions
    48: 0000000000005cc0    33 FUNC    GLOBAL DEFAULT   11 GifFreeMapObject
    49: 0000000000005830   137 FUNC    GLOBAL DEFAULT   11 GifDrawBox
    50: 0000000000003b90   206 FUNC    GLOBAL DEFAULT   11 DGifGetPixel
    51: 00000000000063b0   323 FUNC    GLOBAL DEFAULT   11 GifErrorString
    52: 0000000000004670   230 FUNC    GLOBAL DEFAULT   11 EGifGetGifVersion
    53: 0000000000002f10   460 FUNC    GLOBAL DEFAULT   11 DGifOpen
    54: 0000000000004770   683 FUNC    GLOBAL DEFAULT   11 EGifPutScreenDesc
    55: 0000000000005440   315 FUNC    GLOBAL DEFAULT   11 EGifCloseFile
    56: 0000000000005410    40 FUNC    GLOBAL DEFAULT   11 EGifPutCode
    57: 0000000000004ea0   104 FUNC    GLOBAL DEFAULT   11 EGifPutExtensionLeader
    58: 0000000000004420   231 FUNC    GLOBAL DEFAULT   11 EGifOpenFileHandle
    59: 00000000000035c0   264 FUNC    GLOBAL DEFAULT   11 DGifGetExtensionNext
    60: 00000000000060b0    97 FUNC    GLOBAL DEFAULT   11 FreeLastSavedImage
    61: 0000000000005230    67 FUNC    GLOBAL DEFAULT   11 EGifGCBToExtension
    62: 0000000000002ed0    55 FUNC    GLOBAL DEFAULT   11 DGifOpenFileName
    63: 0000000000004f10   135 FUNC    GLOBAL DEFAULT   11 EGifPutExtensionBlock
    64: 000000000000a000     0 NOTYPE  GLOBAL DEFAULT   22 __bss_start
    65: 000000000000a008     0 NOTYPE  GLOBAL DEFAULT   22 _end
    66: 00000000000062a0   181 FUNC    GLOBAL DEFAULT   11 GifFreeSavedImages
    67: 00000000000039a0   280 FUNC    GLOBAL DEFAULT   11 DGifGetCodeNext
    68: 00000000000045a0   207 FUNC    GLOBAL DEFAULT   11 EGifOpen
    69: 0000000000004e30   108 FUNC    GLOBAL DEFAULT   11 EGifPutPixel
    70: 0000000000007060  1024 OBJECT  GLOBAL DEFAULT   13 GifAsciiTable8x8
    71: 0000000000005af0    19 FUNC    GLOBAL DEFAULT   11 _ClearHashTable
    72: 0000000000003200   955 FUNC    GLOBAL DEFAULT   11 DGifGetImageDesc
    73: 0000000000005f70   177 FUNC    GLOBAL DEFAULT   11 GifAddExtensionBlock
    74: 0000000000006360    66 FUNC    GLOBAL DEFAULT   11 reallocarray
    75: 000000000000a000     0 NOTYPE  GLOBAL DEFAULT   22 _edata
    76: 0000000000005790   160 FUNC    GLOBAL DEFAULT   11 GifDrawText8x8
    77: 0000000000005cf0   566 FUNC    GLOBAL DEFAULT   11 GifUnionColorMap
    78: 0000000000004510   135 FUNC    GLOBAL DEFAULT   11 EGifOpenFileName
    79: 0000000000005280   229 FUNC    GLOBAL DEFAULT   11 EGifGCBToSavedExtension
    80: 0000000000005b80   104 FUNC    GLOBAL DEFAULT   11 _ExistsHashTable
    81: 0000000000006590  1672 FUNC    GLOBAL DEFAULT   11 GifQuantizeBuffer
    82: 0000000000002d10   444 FUNC    GLOBAL DEFAULT   11 DGifOpenFileHandle
    83: 0000000000003d60   697 FUNC    GLOBAL DEFAULT   11 DGifSlurp
    84: 0000000000005bf0    35 FUNC    GLOBAL DEFAULT   11 GifBitSize

Symbols libgif 5.1.9


Symbol table '.dynsym' contains 82 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.2.5 (2)
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.2.5 (2)
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
     4: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcpy@GLIBC_2.2.5 (2)
     5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fread@GLIBC_2.2.5 (2)
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fclose@GLIBC_2.2.5 (2)
     7: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.2.5 (2)
     8: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (3)
     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.2.5 (2)
    10: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND close@GLIBC_2.2.5 (2)
    11: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strtok_r@GLIBC_2.2.5 (2)
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND calloc@GLIBC_2.2.5 (2)
    13: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (4)
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.2.5 (2)
    16: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND realloc@GLIBC_2.2.5 (2)
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fdopen@GLIBC_2.2.5 (2)
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND open@GLIBC_2.2.5 (2)
    19: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fwrite@GLIBC_2.2.5 (2)
    20: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
    21: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.2.5 (2)
    22: 0000000000006540    65 FUNC    GLOBAL DEFAULT   12 _InsertHashTable
    23: 0000000000004b50   901 FUNC    GLOBAL DEFAULT   12 EGifPutImageDesc
    24: 0000000000003dc0   207 FUNC    GLOBAL DEFAULT   12 DGifGetLZCodes
    25: 00000000000056c0   550 FUNC    GLOBAL DEFAULT   12 EGifSpew
    26: 0000000000003be0   206 FUNC    GLOBAL DEFAULT   12 DGifGetLine
    27: 0000000000002e30   413 FUNC    GLOBAL DEFAULT   12 DGifGetScreenDesc
    28: 0000000000003870   145 FUNC    GLOBAL DEFAULT   12 DGifGetExtension
    29: 00000000000065e0    83 FUNC    GLOBAL DEFAULT   12 openbsd_reallocarray
    30: 0000000000003910    77 FUNC    GLOBAL DEFAULT   12 DGifExtensionToGCB
    31: 0000000000005920   166 FUNC    GLOBAL DEFAULT   12 GifMakeMapObject
    32: 0000000000003350   209 FUNC    GLOBAL DEFAULT   12 DGifGetRecordType
    33: 0000000000003960   131 FUNC    GLOBAL DEFAULT   12 DGifSavedExtensionToGCB
    34: 00000000000052c0   183 FUNC    GLOBAL DEFAULT   12 EGifPutComment
    35: 00000000000039f0   301 FUNC    GLOBAL DEFAULT   12 DGifCloseFile
    36: 0000000000004ee0   122 FUNC    GLOBAL DEFAULT   12 EGifPutLine
    37: 0000000000005c40    53 FUNC    GLOBAL DEFAULT   12 GifApplyTranslation
    38: 0000000000004880    16 FUNC    GLOBAL DEFAULT   12 EGifSetGifVersion
    39: 00000000000054b0   159 FUNC    GLOBAL DEFAULT   12 EGifPutCodeNext
    40: 00000000000050d0   107 FUNC    GLOBAL DEFAULT   12 EGifPutExtensionTrailer
    41: 0000000000006510    38 FUNC    GLOBAL DEFAULT   12 _InitHashTable
    42: 0000000000006310   472 FUNC    GLOBAL DEFAULT   12 GifDrawBoxedText8x8
    43: 0000000000003d90    42 FUNC    GLOBAL DEFAULT   12 DGifGetCode
    44: 00000000000051e0   222 FUNC    GLOBAL DEFAULT   12 EGifPutExtension
    45: 0000000000005e30   382 FUNC    GLOBAL DEFAULT   12 GifMakeSavedImage
    46: 0000000000006290   117 FUNC    GLOBAL DEFAULT   12 GifDrawRectangle
    47: 0000000000005d40   117 FUNC    GLOBAL DEFAULT   12 GifFreeExtensions
    48: 00000000000059d0    33 FUNC    GLOBAL DEFAULT   12 GifFreeMapObject
    49: 0000000000006200   137 FUNC    GLOBAL DEFAULT   12 GifDrawBox
    50: 0000000000003cb0   214 FUNC    GLOBAL DEFAULT   12 DGifGetPixel
    51: 0000000000006070   216 FUNC    GLOBAL DEFAULT   12 GifErrorString
    52: 0000000000004790   230 FUNC    GLOBAL DEFAULT   12 EGifGetGifVersion
    53: 00000000000031a0   373 FUNC    GLOBAL DEFAULT   12 DGifOpen
    54: 0000000000004890   700 FUNC    GLOBAL DEFAULT   12 EGifPutScreenDesc
    55: 0000000000005580   313 FUNC    GLOBAL DEFAULT   12 EGifCloseFile
    56: 0000000000003320    34 FUNC    GLOBAL DEFAULT   12 DGifGetGifVersion
    57: 0000000000005550    37 FUNC    GLOBAL DEFAULT   12 EGifPutCode
    58: 0000000000004fd0   112 FUNC    GLOBAL DEFAULT   12 EGifPutExtensionLeader
    59: 0000000000004540   225 FUNC    GLOBAL DEFAULT   12 EGifOpenFileHandle
    60: 00000000000037c0   173 FUNC    GLOBAL DEFAULT   12 DGifGetExtensionNext
    61: 0000000000005dc0    97 FUNC    GLOBAL DEFAULT   12 FreeLastSavedImage
    62: 0000000000005380    67 FUNC    GLOBAL DEFAULT   12 EGifGCBToExtension
    63: 0000000000003160    56 FUNC    GLOBAL DEFAULT   12 DGifOpenFileName
    64: 0000000000005040   134 FUNC    GLOBAL DEFAULT   12 EGifPutExtensionBlock
    65: 0000000000003430   643 FUNC    GLOBAL DEFAULT   12 DGifGetImageHeader
    66: 0000000000005fb0   181 FUNC    GLOBAL DEFAULT   12 GifFreeSavedImages
    67: 0000000000003b20   181 FUNC    GLOBAL DEFAULT   12 DGifGetCodeNext
    68: 00000000000046c0   200 FUNC    GLOBAL DEFAULT   12 EGifOpen
    69: 0000000000004f60   108 FUNC    GLOBAL DEFAULT   12 EGifPutPixel
    70: 00000000000074a0  1024 OBJECT  GLOBAL DEFAULT   14 GifAsciiTable8x8
    71: 00000000000064f0    19 FUNC    GLOBAL DEFAULT   12 _ClearHashTable
    72: 00000000000036c0   254 FUNC    GLOBAL DEFAULT   12 DGifGetImageDesc
    73: 0000000000005c80   177 FUNC    GLOBAL DEFAULT   12 GifAddExtensionBlock
    74: 0000000000006150   164 FUNC    GLOBAL DEFAULT   12 GifDrawText8x8
    75: 0000000000005a00   564 FUNC    GLOBAL DEFAULT   12 GifUnionColorMap
    76: 0000000000004630   136 FUNC    GLOBAL DEFAULT   12 EGifOpenFileName
    77: 00000000000053d0   214 FUNC    GLOBAL DEFAULT   12 EGifGCBToSavedExtension
    78: 0000000000006590    70 FUNC    GLOBAL DEFAULT   12 _ExistsHashTable
    79: 0000000000002fd0   400 FUNC    GLOBAL DEFAULT   12 DGifOpenFileHandle
    80: 0000000000003e90   675 FUNC    GLOBAL DEFAULT   12 DGifSlurp
    81: 00000000000058f0    35 FUNC    GLOBAL DEFAULT   12 GifBitSize

@TraceLD
Copy link

TraceLD commented Jul 26, 2019

If your issue concerns System.Drawing.Common, use 4.6.0-preview7.19362.9 version of System.Drawing.Common like so:
<PackageReference Include="System.Drawing.Common" Version="4.6.0-preview7.19362.9" /> to fix the issue.

akoeplinger added a commit to akoeplinger/libgdiplus that referenced this issue Jul 31, 2019
This is similar to mono#37 except this time they removed the function completely.
Adding a stub which just ignores quantization until we have a use case that would require bringing back the functionality.

Fixes mono#546
akoeplinger added a commit to akoeplinger/libgdiplus that referenced this issue Jul 31, 2019
This is similar to mono#37 except this time they removed the function completely.
Adding a stub which just ignores quantization until we have a use case that would require bringing back the functionality.

Fixes mono#546
akoeplinger added a commit to akoeplinger/libgdiplus that referenced this issue Aug 1, 2019
It was removed upstream so we need to include a copy of it.
The upstream code is licensed as MIT.

Fixes mono#546
akoeplinger added a commit that referenced this issue Aug 1, 2019
)

It was removed upstream so we need to include a copy of it.
The upstream code is licensed as MIT.

Fixes #546
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants