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

Add ZLib dependency into profiler #761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bollu
Copy link

@bollu bollu commented Mar 27, 2024

This fixes missing dependencies when compiling tracy-profiler with LEGACY=ON:

[100%] Linking CXX executable tracy-profiler
lto-wrapper: warning: using serial compilation of 6 LTRANS jobs

/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `ft_gzip_file_fill_output':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:439: undefined reference to `inflate'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `ft_gzip_file_reset':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:359: undefined reference to `inflateReset'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `ft_gzip_file_done':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:330: undefined reference to `inflateEnd'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `ft_gzip_file_init':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:315: undefined reference to `inflateInit2_'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `ft_gzip_file_done':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:330: undefined reference to `inflateEnd'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftgzip.c.o): in function `FT_Gzip_Uncompress':
/homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:749: undefined reference to `inflateInit2_'
/usr/bin/ld: /homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:753: undefined reference to `inflate'
/usr/bin/ld: /homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:756: undefined reference to `inflateEnd'
/usr/bin/ld: /homes/sb2743/2024-borrowing/tracy/build/profiler/_deps/freetype-src/src/gzip/ftgzip.c:764: undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/tracy-profiler.dir/build.make:1165: tracy-profiler] Error 1
make[1]: *** [CMakeFiles/Makefile2:280: CMakeFiles/tracy-profiler.dir/all] Error 2

@wolfpld
Copy link
Owner

wolfpld commented Mar 27, 2024

Zlib is a freetype dependency. Adding it to the profiler is incorrect.

% ldd /usr/lib/libfreetype.so | grep libz
        libz.so.1 => /usr/lib/libz.so.1 (0x00007a5840220000)

@bollu
Copy link
Author

bollu commented Mar 29, 2024

Then I am somewhat unsure as to why this fixes a link issue I have.

@wolfpld
Copy link
Owner

wolfpld commented Mar 29, 2024

You are trying to link in a static library (libfreetype.a). Static libraries do not carry link dependencies. What is your reason for not using a shared library?

Anyways, this is a problem with your system configuration. Try enabling the DOWNLOAD_FREETYPE CMake option to circumvent.

@wolfpld wolfpld force-pushed the master branch 4 times, most recently from 2511616 to aa451b4 Compare September 20, 2024 19:28
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

Successfully merging this pull request may close these issues.

2 participants