Thread: Compilation problems
Hi everyone! I've had problems compiling pgadmin3 following the instructions on the web page. I sent a message to the pgadmin-support list and finally I could compile it using a patch created by Raphaël Enrici (available here: http://archives.postgresql.org/pgadmin-support/2004-02/msg00087.php). He asked me to send my config log to this list because there seems to be some problems with the configure script. The main problem: with Postgresql 7.4 and wxWindows 2.5 (plus stc and xrc) correctly compiled and installed (the version available on the pgadmin mirrors, compiled following the web instructions), when I try to build pgadmin the configure script apparently runs fine but later on the build the wxWindows libraries aren't invoked, so the link fails, sending hundreds of "undefined reference" errors. Another problem: after using Raphaël's patch, I got an "undefined reference" to PQgetssl. I solved it recompiling Postgresql with SSL support, but according to Raphaël the configure script should have checked the presence of SSL inside libpq and should have not included SSL support in pgadmin. And there is one more issue: if you use --enable-static option, the resulting binary is still linked dynamically to libssl, libcrypt and libcrypto libraries. Maybe this is a bit confusing, because I expected a purely static binary. For more information, I tried to compile pgadmin on Debian Woody and Mandrake 9.1 and the first problem happened on both distributions. Finally I built it on Mandrake, so I don't know if the other problems are still present on Debian, but I suppose they are. That's all! Regards, Diego
Attachment
Diego wrote: >The main problem: with Postgresql 7.4 and wxWindows 2.5 (plus stc and xrc) >correctly compiled and installed (the version available on the pgadmin >mirrors, compiled following the web instructions), when I try to build >pgadmin the configure script apparently runs fine but later on the build the >wxWindows libraries aren't invoked, so the link fails, sending hundreds of >"undefined reference" errors. > > The wx libraries are added to the linker flags by using the output from wx-config. The configure script seems to have found your wx-config binary, but for some reason the output isn't working. What does `wx-config --static --libs` produce on your system? What about `wx-config --libs`? Try dropping the --enable-static flag to configure and see what happens. >Another problem: after using Raphaël's patch, I got an "undefined reference" >to PQgetssl. I solved it recompiling Postgresql with SSL support, but >according to Raphaël the configure script should have checked the presence >of SSL inside libpq and should have not included SSL support in pgadmin. > > Don't apply Raphael's patch. Follow the directions on the pgadmin.org web site to checkout the sources and run the boostrap script to generate the configure script. >And there is one more issue: if you use --enable-static option, the >resulting binary is still linked dynamically to libssl, libcrypt and >libcrypto libraries. Maybe this is a bit confusing, because I expected a >purely static binary. > > For now, try not using --enable-static. ahp
Hi, Adam. Sorry for the delay. ----- Original Message ----- From: "Adam H. Pendleton" <fmonkey@fmonkey.net> To: "Diego" <diegoman@usuarios.retecal.es> Cc: <pgadmin-hackers@postgresql.org> Sent: Tuesday, March 23, 2004 9:20 PM Subject: Re: [pgadmin-hackers] Compilation problems > Diego wrote: > > >The main problem: with Postgresql 7.4 and wxWindows 2.5 (plus stc and xrc) > >correctly compiled and installed (the version available on the pgadmin > >mirrors, compiled following the web instructions), when I try to build > >pgadmin the configure script apparently runs fine but later on the build the > >wxWindows libraries aren't invoked, so the link fails, sending hundreds of > >"undefined reference" errors. > > > > > The wx libraries are added to the linker flags by using the output from > wx-config. The configure script seems to have found your wx-config > binary, but for some reason the output isn't working. What does > `wx-config --static --libs` produce on your system? What about > `wx-config --libs`? The output of both commands is identical (tested with diff): -L/usr/local/lib -pthread /usr/local/lib/libwx_gtk2ud_html-2.5.a /usr/local/lib/libwx_gtk2ud_adv-2.5.a /usr/local/lib/libwx_gtk2ud_core-2.5.a /usr/local/lib/libwx_baseud_xml-2.5.a /usr/local/lib/libwx_baseud_net-2.5.a /usr/local/lib/libwx_baseud-2.5.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgd k_pixbuf-2.0 -lm -lpangox-1.0 -lpangoxft-1.0 -lpango-1.0 -lgobject-2.0 -lgmo dule-2.0 -ldl -lgthread-2.0 -lpthread -lglib-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lpng -ljpeg -ltiff -lz -ldl -lm -lwxexpatd > Try dropping the --enable-static flag to configure > and see what happens. If you were referring to the configure script of pgadmin (and not wxWindows), I get the same "undefined reference" errors. I configured it only with --enable-debug option. > >Another problem: after using Raphaël's patch, I got an "undefined reference" > >to PQgetssl. I solved it recompiling Postgresql with SSL support, but > >according to Raphaël the configure script should have checked the presence > >of SSL inside libpq and should have not included SSL support in pgadmin. > > > > > Don't apply Raphael's patch. Follow the directions on the pgadmin.org > web site to checkout the sources and run the boostrap script to generate > the configure script. > > >And there is one more issue: if you use --enable-static option, the > >resulting binary is still linked dynamically to libssl, libcrypt and > >libcrypto libraries. Maybe this is a bit confusing, because I expected a > >purely static binary. > > > > > For now, try not using --enable-static. > > ahp > Regards, Diego