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

libtiff: compiling/linking tiffgt fails, undefined references to FreeGLUT symbols #2681

Closed
LigH-de opened this issue May 14, 2024 · 3 comments

Comments

@LigH-de
Copy link
Contributor

LigH-de commented May 14, 2024

...
[120/125] Linking C executable tools\tiffgt.exe
FAILED: tools/tiffgt.exe 
C:\Windows\system32\cmd.exe /C "cd . && G:\MABS\msys64\mingw32\bin\ccache.exe  gcc -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -mthreads -DFREEGLUT_STATIC -Wall -Winline -Wformat-security -Wpointer-arith -Wdisabled-optimization -Wno-unknown-pragmas -fstrict-aliasing -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -fstack-protector-strong -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -static-libgcc -static-libstdc++ tools/CMakeFiles/tiffgt.dir/tiffgt.c.o -o tools\tiffgt.exe -Wl,--out-implib,tools\libtiffgt.dll.a -Wl,--major-image-version,0,--minor-image-version,0  libtiff/libtiff.a  -lopengl32  G:/MABS/local32/lib/libglut.a  G:/MABS/msys64/mingw32/lib/libz.a  G:/MABS/msys64/mingw32/lib/libdeflate.a  G:/MABS/msys64/mingw32/lib/libjpeg.a  G:/MABS/msys64/mingw32/lib/liblzma.a  G:/MABS/msys64/mingw32/lib/libzstd.a  G:/MABS/msys64/mingw32/lib/libm.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/14.1.0/../../../../i686-w64-mingw32/bin/ld.exe: G:/MABS/local32/lib/libglut.a(fg_misc.c.obj):fg_misc.c:(.text+0x51): undefined reference to `_imp__glGetString@4'
G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/14.1.0/../../../../i686-w64-mingw32/bin/ld.exe: G:/MABS/local32/lib/libglut.a(fg_misc.c.obj):fg_misc.c:(.text+0xc4): undefined reference to `_imp__glGetError@0'
G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/14.1.0/../../../../i686-w64-mingw32/bin/ld.exe: G:/MABS/local32/lib/libglut.a(fg_window.c.obj):fg_window.c:(.text+0x199): undefined reference to `_imp__glDrawBuffer@4'
G:/MABS/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/14.1.0/../../../../i686-w64-mingw32/bin/ld.exe: G:/MABS/local32/lib/libglut.a(fg_window.c.obj):fg_window.c:(.text+0x1a9): undefined reference to `_imp__glReadBuffer@4'
...

https://gitlab.com/libtiff/libtiff/-/issues/637

logs.zip

@LigH-de
Copy link
Contributor Author

LigH-de commented May 14, 2024

Suggestion by @rouault

Looks like a CMake static linking issue with FreeGLUT.
You can disable tiffgt for such build with cmake -Dtiff-opengl=OFF
Or maybe manually set -DOPENGL_gl_LIBRARY to where the OpenGL library on your system is

@Zordrak
Copy link

Zordrak commented May 14, 2024

Workaround for people who just need this to work today:

do_cmakeinstall global -D{webp,jbig,lerc}=OFF "${extracommands[@]}"

from: do_cmakeinstall global -D{webp,jbig,lerc}=OFF "${extracommands[@]}"
to: do_cmakeinstall global -D{webp,jbig,lerc,tiff-opengl}=OFF "${extracommands[@]}"

@1480c1
Copy link
Member

1480c1 commented May 17, 2024

d25cdbc

@1480c1 1480c1 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants