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

All lodepng functions are missing.. Where can I find flif.pc for pkg-config? #562

Open
gadefox opened this issue Aug 2, 2021 · 2 comments

Comments

@gadefox
Copy link

gadefox commented Aug 2, 2021

I'm trying to compile sources using ninja, unfortunately I'm getting the error bellow. Any idea? I can use cmake (CMakeLists.txt file in src folder), but I'm not sure this is for the production use. And finally, could you please provide me w/ the .pc file? Thanks a lot.

[18/18] g++ -O2 -ftree-vectorize -DNDEBUG obj/src/flif-enc.o obj/src/flif.o obj/src/flif-dec.o obj/src/io.o obj/src/common.o obj/src/...rc/image/image.o obj/src/image/crc32k.o obj/src/image/color_range.o obj/src/transform/factory.o pkg-config --libs libpng -o src/flif
FAILED: src/flif
g++ -O2 -ftree-vectorize -DNDEBUG obj/src/flif-enc.o obj/src/flif.o obj/src/flif-dec.o obj/src/io.o obj/src/common.o obj/src/maniac/bit.o obj/src/maniac/chance.o obj/src/maniac/symbol.o obj/src/image/image-rggb.o obj/src/image/image-pam.o obj/src/image/image-metadata.o obj/src/image/image-png.o obj/src/image/image-pnm.o obj/src/image/image.o obj/src/image/crc32k.o obj/src/image/color_range.o obj/src/transform/factory.o pkg-config --libs libpng -o src/flif
/usr/local/bin/ld: obj/src/image/image-metadata.o: in function image_save_metadata(char const*, Image const&, char const*)': image-metadata.cpp:(.text+0x6b0): undefined reference to lodepng_default_decompress_settings'
/usr/local/bin/ld: image-metadata.cpp:(.text+0x6c5): undefined reference to lodepng_inflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGDecompressSettings const*)' /usr/local/bin/ld: obj/src/image/image-metadata.o: in function image_load_metadata(char const*, Image&, char const*)':
image-metadata.cpp:(.text+0xbd9): undefined reference to lodepng_default_compress_settings' /usr/local/bin/ld: image-metadata.cpp:(.text+0xbe7): undefined reference to lodepng_deflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGCompressSettings const*)'
/usr/local/bin/ld: obj/src/image/image-png.o: in function image_save_png(char const*, Image const&)': image-png.cpp:(.text+0x80c): undefined reference to lodepng_default_decompress_settings'
/usr/local/bin/ld: image-png.cpp:(.text+0x823): undefined reference to lodepng_inflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGDecompressSettings const*)' /usr/local/bin/ld: image-png.cpp:(.text+0x8d4): undefined reference to lodepng_default_decompress_settings'
/usr/local/bin/ld: image-png.cpp:(.text+0x8eb): undefined reference to lodepng_inflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGDecompressSettings const*)' /usr/local/bin/ld: obj/src/image/image-png.o: in function image_load_png(char const*, Image&, metadata_options&)':
image-png.cpp:(.text+0x1c0d): undefined reference to lodepng_default_compress_settings' /usr/local/bin/ld: image-png.cpp:(.text+0x1dd5): undefined reference to lodepng_deflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGCompressSettings const*)'
/usr/local/bin/ld: image-png.cpp:(.text+0x2018): undefined reference to lodepng_deflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGCompressSettings const*)' /usr/local/bin/ld: image-png.cpp:(.text+0x2206): undefined reference to lodepng_default_compress_settings'
/usr/local/bin/ld: image-png.cpp:(.text+0x222e): undefined reference to `lodepng_deflate(unsigned char**, unsigned int*, unsigned char const*, unsigned int, LodePNGCompressSettings const*)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@bjorn3
Copy link

bjorn3 commented Aug 2, 2021

  1. According to the readme you first need to install the libpng-dev or libpng-devel package depending on your linux distro:

Install the dependencies

On Debian:

  • for the encoder/decoder: sudo apt-get install libpng-dev
  • for the viewer: sudo apt-get install libsdl2-dev

On Fedora:

  • for the encoder/decoder: sudo dnf install libpng-devel
  • for the viewer: sudo dnf install SDL-devel

On Ubuntu:

  • for the encoder/decoder: sudo apt-get install libpng-dev make pkg-config
  • for the viewer: sudo apt-get install libsdl2-dev
  1. You may want to use JPEG XL instead.

FLIF development has stopped since FLIF is superseded by FUIF and then again by JPEG XL, which is based on a combination of Pik and FUIF. A royalty-free and open source reference implementation of JPEG XL is available on GitLab. For more information, see Jon's JXL info page or visit the JPEG XL Discord server

@gadefox
Copy link
Author

gadefox commented Aug 2, 2021

My apologies, I should write at the beginning that I'm using Ubuntu 18.04 w/ installed libpng-dev 1.6.34. It's weird, because I can build flif, gif2flif and libflif.so.0 using make (makefile is included in the source code) - so ninja is not fully configured. Anyway, I'll use JXL.. Tx

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

2 participants