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

undefined reference to `prusaslicer_png_destroy_read_struct' in compiling #13560

Open
2 tasks
dariosharp opened this issue Nov 5, 2024 · 0 comments
Open
2 tasks

Comments

@dariosharp
Copy link

dariosharp commented Nov 5, 2024

Description of the bug

Hi,

I'm trying to compile PrusaSlicer from the sourcecode, but I get an error during the compilation. I have followed the building guide and I have properly compiled the dipendeces but when I try to compile the whole program I get the following error:

/usr/bin/ld: libslic3r/liblibslic3r.a(PNGReadWrite.cpp.o): in function `Slic3r::png::png_read_callback(png_struct_def*, unsigned char*, unsigned long)':
PNGReadWrite.cpp:(.text+0xb): undefined reference to `prusaslicer_png_get_io_ptr'
/usr/bin/ld: libslic3r/liblibslic3r.a(PNGReadWrite.cpp.o): in function `Slic3r::png::is_png(Slic3r::png::ReadBuf const&)':
PNGReadWrite.cpp:(.text+0x6f): undefined reference to `prusaslicer_png_sig_cmp'
/usr/bin/ld: libslic3r/liblibslic3r.a(PNGReadWrite.cpp.o): in function `Slic3r::png::decode_png(Slic3r::png::IStream&, Slic3r::png::Image<unsigned char>&)':
PNGReadWrite.cpp:(.text+0xc1): undefined reference to `prusaslicer_png_sig_cmp'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x106): undefined reference to `prusaslicer_png_create_read_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x11b): undefined reference to `prusaslicer_png_create_info_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x13c): undefined reference to `prusaslicer_png_set_read_fn'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x14a): undefined reference to `prusaslicer_png_set_sig_bytes'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x158): undefined reference to `prusaslicer_png_read_info'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x166): undefined reference to `prusaslicer_png_get_image_width'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x17a): undefined reference to `prusaslicer_png_get_image_height'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x18e): undefined reference to `prusaslicer_png_get_color_type'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x19e): undefined reference to `prusaslicer_png_get_bit_depth'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x202): undefined reference to `prusaslicer_png_read_row'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x23e): undefined reference to `prusaslicer_png_destroy_info_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x255): undefined reference to `prusaslicer_png_destroy_read_struct'
/usr/bin/ld: libslic3r/liblibslic3r.a(PNGReadWrite.cpp.o): in function `Slic3r::png::write_rgb_or_gray_to_file(char const*, unsigned long, unsigned long, int, unsigned char const*)':
PNGReadWrite.cpp:(.text+0x2f6): undefined reference to `prusaslicer_png_create_write_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x30f): undefined reference to `prusaslicer_png_create_info_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x339): undefined reference to `prusaslicer_png_set_longjmp_fn'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x38f): undefined reference to `prusaslicer_png_set_IHDR'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x3a8): undefined reference to `prusaslicer_png_malloc'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x3dc): undefined reference to `prusaslicer_png_malloc'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x40e): undefined reference to `prusaslicer_png_init_io'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x426): undefined reference to `prusaslicer_png_set_rows'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x43f): undefined reference to `prusaslicer_png_write_png'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x461): undefined reference to `prusaslicer_png_free'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x476): undefined reference to `prusaslicer_png_free'
/usr/bin/ld: PNGReadWrite.cpp:(.text+0x490): undefined reference to `prusaslicer_png_destroy_write_struct' 
/usr/bin/ld: libslic3r/liblibslic3r.a(PNGReadWrite.cpp.o): in function `Slic3r::png::decode_png(Slic3r::png::IStream&, Slic3r::png::Image<unsigned char>&) [clone .cold]':
PNGReadWrite.cpp:(.text.unlikely+0x17): undefined reference to `prusaslicer_png_destroy_info_struct'
/usr/bin/ld: PNGReadWrite.cpp:(.text.unlikely+0x2a): undefined reference to `prusaslicer_png_destroy_read_struct'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wx_PNG_stream_reader':
imagpng.cpp:(.text+0x1d): undefined reference to `prusaslicer_png_get_io_ptr'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wx_PNG_stream_writer':
imagpng.cpp:(.text+0x4d): undefined reference to `prusaslicer_png_get_io_ptr'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wx_PNG_warning':
imagpng.cpp:(.text+0x286): undefined reference to `prusaslicer_png_get_io_ptr'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wx_PNG_error':
imagpng.cpp:(.text+0x8cf): undefined reference to `prusaslicer_png_get_io_ptr'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wxPNGHandler::GetLibraryVersionInfo()':
imagpng.cpp:(.text+0x1397): undefined reference to `prusaslicer_png_get_header_version'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wxPNGHandler::SaveFile(wxImage*, wxOutputStream&, bool)':
imagpng.cpp:(.text+0x2536): undefined reference to `prusaslicer_png_create_write_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x254e): undefined reference to `prusaslicer_png_create_info_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x2586): undefined reference to `prusaslicer_png_destroy_write_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x2e16): undefined reference to `prusaslicer_png_set_write_fn'
/usr/bin/ld: imagpng.cpp:(.text+0x3c80): undefined reference to `prusaslicer_png_set_filter'
/usr/bin/ld: imagpng.cpp:(.text+0x413f): undefined reference to `prusaslicer_png_set_compression_level'
/usr/bin/ld: imagpng.cpp:(.text+0x45fe): undefined reference to `prusaslicer_png_set_compression_mem_level'
/usr/bin/ld: imagpng.cpp:(.text+0x4946): undefined reference to `prusaslicer_png_set_compression_strategy' 
/usr/bin/ld: imagpng.cpp:(.text+0x4cc2): undefined reference to `prusaslicer_png_set_IHDR'
/usr/bin/ld: imagpng.cpp:(.text+0x4d9a): undefined reference to `prusaslicer_png_set_sBIT'
/usr/bin/ld: imagpng.cpp:(.text+0x4dad): undefined reference to `prusaslicer_png_write_info'
/usr/bin/ld: imagpng.cpp:(.text+0x4dc0): undefined reference to `prusaslicer_png_set_shift'
/usr/bin/ld: imagpng.cpp:(.text+0x4dcc): undefined reference to `prusaslicer_png_set_packing'
/usr/bin/ld: imagpng.cpp:(.text+0x5159): undefined reference to `prusaslicer_png_write_rows'
/usr/bin/ld: imagpng.cpp:(.text+0x5198): undefined reference to `prusaslicer_png_write_end'
/usr/bin/ld: imagpng.cpp:(.text+0x51ab): undefined reference to `prusaslicer_png_destroy_write_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x57af): undefined reference to `prusaslicer_png_set_PLTE'
/usr/bin/ld: imagpng.cpp:(.text+0x57f8): undefined reference to `prusaslicer_png_set_tRNS'
/usr/bin/ld: imagpng.cpp:(.text+0x5b3a): undefined reference to `prusaslicer_png_set_compression_buffer_size'
/usr/bin/ld: imagpng.cpp:(.text+0x5cdc): undefined reference to `prusaslicer_png_set_pHYs'
/usr/bin/ld: imagpng.cpp:(.text+0x5f69): undefined reference to `prusaslicer_png_set_tRNS'
/usr/bin/ld: imagpng.cpp:(.text+0x65f6): undefined reference to `prusaslicer_png_destroy_write_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x660b): undefined reference to `prusaslicer_png_destroy_write_struct'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `(anonymous namespace)::wxPNGImageData::DoLoadPNGFile(wxImage*, (anonym
ous namespace)::wxPNGInfoStruct&) [clone .constprop.0]':
imagpng.cpp:(.text+0x6b78): undefined reference to `prusaslicer_png_create_read_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x6b93): undefined reference to `prusaslicer_png_set_read_fn'
/usr/bin/ld: imagpng.cpp:(.text+0x6b9c): undefined reference to `prusaslicer_png_create_info_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x6bdd): undefined reference to `prusaslicer_png_read_info'
/usr/bin/ld: imagpng.cpp:(.text+0x6c0e): undefined reference to `prusaslicer_png_get_IHDR'
/usr/bin/ld: imagpng.cpp:(.text+0x6c1b): undefined reference to `prusaslicer_png_set_expand'
/usr/bin/ld: imagpng.cpp:(.text+0x6c24): undefined reference to `prusaslicer_png_set_gray_to_rgb'
/usr/bin/ld: imagpng.cpp:(.text+0x6c2d): undefined reference to `prusaslicer_png_set_strip_16'
/usr/bin/ld: imagpng.cpp:(.text+0x6c36): undefined reference to `prusaslicer_png_set_packing'
/usr/bin/ld: imagpng.cpp:(.text+0x6d08): undefined reference to `prusaslicer_png_read_image'
/usr/bin/ld: imagpng.cpp:(.text+0x6d15): undefined reference to `prusaslicer_png_read_end'
/usr/bin/ld: imagpng.cpp:(.text+0x6d54): undefined reference to `prusaslicer_png_get_pHYs'
/usr/bin/ld: imagpng.cpp:(.text+0x6d92): undefined reference to `prusaslicer_png_get_valid'
/usr/bin/ld: imagpng.cpp:(.text+0x7e28): undefined reference to `prusaslicer_png_get_PLTE'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wxPNGHandler::LoadFile(wxImage*, wxInputStream&, bool, int)':
imagpng.cpp:(.text+0x994f): undefined reference to `prusaslicer_png_destroy_read_struct'
/usr/bin/ld: imagpng.cpp:(.text+0x9980): undefined reference to `prusaslicer_png_destroy_read_struct'
/usr/bin/ld: /mnt/work/****/PrusaSlicer-version_2.8.1/deps/build/destdir/usr/local/lib/libwx_gtk3u_core-3.2.a(imagpng.cpp.o): in function `wxPNGHandler::LoadFile(wxImage*, wxInputStream&, bool, int) [clone .co
ld]':
imagpng.cpp:(.text.unlikely+0x9e2): undefined reference to `prusaslicer_png_destroy_read_struct'
/usr/bin/ld: imagpng.cpp:(.text.unlikely+0xa48): undefined reference to `prusaslicer_png_destroy_read_struct'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/PrusaSlicer.dir/build.make:199: src/prusa-slicer] Error 1
make[1]: *** [CMakeFiles/Makefile2:1129: src/CMakeFiles/PrusaSlicer.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Can you help me?

Project file & How to reproduce

none

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

PrusaSlicer version 2.8.1

Operating system

Debian GNU/Linux trixie

Printer model

none

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

1 participant