linux x64: build 1.9 errors with libz, libpng and libjpeg

hello,

im trying to build panda3d 1.9 from source, with a lot of modules disabled (that i dont need) but i get undefined references to functions of libzip, libjpeg and libpng:

disabled modules i dont need:

WARNING: Could not locate pkg-config package eigen3, excluding from build
WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package fcollada, excluding from build
WARNING: Could not locate thirdparty package ffmpeg, excluding from build
WARNING: Could not locate thirdparty package swscale, excluding from build
WARNING: Could not locate thirdparty package swresample, excluding from build
WARNING: Could not locate thirdparty package fftw, excluding from build
WARNING: Could not locate thirdparty package fmodex, excluding from build
WARNING: Could not locate thirdparty package freetype, excluding from build
WARNING: Could not locate thirdparty package gles, excluding from build
WARNING: Could not locate thirdparty package gles2, excluding from build
WARNING: Could not locate thirdparty package egl, excluding from build
WARNING: Could not locate thirdparty package nvidiacg, excluding from build
WARNING: Could not locate thirdparty package ode, excluding from build
WARNING: Could not locate thirdparty package openal, excluding from build
WARNING: Could not locate thirdparty package opencv, excluding from build
WARNING: Could not locate thirdparty package squish, excluding from build
WARNING: Could not locate thirdparty package tiff, excluding from build
WARNING: Could not locate thirdparty package vrpn, excluding from build
WARNING: Could not locate thirdparty package bullet, excluding from build
WARNING: Could not locate thirdparty package vorbis, excluding from build
WARNING: Could not locate thirdparty package rocket, excluding from build
WARNING: Could not locate thirdparty package openssl, excluding from build
WARNING: Could not locate pkg-config package gtk+-2.0, excluding from build
WARNING: Could not locate thirdparty package python, excluding from build

if im corrected, theres not a single module there that should be required for a successful panda3d build, but i still get undefined referenced for libraries that i do have installed:

libpng:

built/lib/libpanda.a(p3pnmimagetypes_composite2.o): In function `PNMFileTypePNG::Writer::write_data(pixel*, unsigned short*)':
p3pnmimagetypes_composite2.cxx:(.text+0x9a39): undefined reference to `png_set_write_fn'

libjpeg:

built/lib/libpanda.a(p3pnmimagetypes_composite1.o): In function `PNMFileTypeJPG::Reader::Reader(PNMFileType*, std::istream*, bool, std::string)':
p3pnmimagetypes_composite1.cxx:(.text+0x7881): undefined reference to `jpeg_std_error'

zlib1:

built/lib/libpandaexpress.a(p3express_composite2.o): In function `ZStreamBuf::write_chars(char const*, unsigned long, int)':
p3express_composite2.cxx:(.text+0x5236): undefined reference to `deflate'

i do have libpng-dev, zlib1g-dev and libjpeg-dev. is there something im missing? thanks in advance.

Hi, welcome to the forums!

Hmm, these errors don’t seem to be due to the fact that you are excluding a lot of packages, but rather that you seem to be making a static build of Panda (I’m guessing you specified --static). We don’t build with static often, so I’m not too surprised it’s not working any more.

I’ll try making my own static build and check in fixes for whatever issues I run into.

thank you so much for the reply.

you’re absolutely right, i forgot to say in the OP that i was bulding with --static, im going to try building it dynamic and see if the errors continue. ill update this post after.

edit: everything went perfect building it dynamic, i cant believe i didnt even try it before asking but for some reason i totally forgot i built it static…

thanks a lot for the help.