Author Topic: a little OT: 'configure' options to wxWidgets in Linux  (Read 6409 times)

rodrigo.canellas

  • Guest
a little OT: 'configure' options to wxWidgets in Linux
« on: September 27, 2007, 11:06:38 pm »
Hi,

I hope this is not considered too off-topic...

I downloaded 'CB_20070905_rev4425_Debian4.0_wx2.8.4.tar.gz' (I believe from September 5th), and 'wxWidgets-2.8.5.tar.bz2'.

If I run './configure', 'make' and 'make install', the library generated is called 'libwx_gtk2univ-2.8.so'.

However, when I run 'codeblocks', I get the message: "codeblocks: error while loading shared libraries: libwx_gtk2u_aui-2.8.so.0: cannot open shared object file: No such file or directory".

I run './configure --help' and there are a large number of parameters. Does anyone know which ones I must turn on/off to produce the correct library name?

Thanks a lot,

    Rodrigo

rodrigo.canellas

  • Guest
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #1 on: September 27, 2007, 11:40:17 pm »
Hi,

Actually, things are a little more complicated...

I run 'ldd /usr/bin/codeblocks', and these, among other, dependencies were listed:
"
        libwx_gtk2u_aui-2.8.so.0 => not found
        libwx_gtk2u_xrc-2.8.so.0 => not found
        libwx_gtk2u_qa-2.8.so.0 => not found
        libwx_gtk2u_html-2.8.so.0 => not found
        libwx_gtk2u_adv-2.8.so.0 => not found
        libwx_gtk2u_core-2.8.so.0 => not found
        libwx_baseu_xml-2.8.so.0 => not found
        libwx_baseu_net-2.8.so.0 => not found
        libwx_baseu-2.8.so.0 => not found
"

So,  I must build 'wxWidgets-2.8.5.tar.bz2' in a way that all these libraries are produced, right? I mean, do I have to run './configure' 9 times, with 9 different parameters, and then (a very long) 'make', and finally a 'make install' (not forgetting the 'make clean' between them)?

Does anyone know if that's really what I should do?

And if so, what are the parameters for each 'libwx*'?

Thanks a lot!!

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #2 on: September 27, 2007, 11:56:58 pm »
Two questions:
1. I wonder why did you get wxUniversal  (this is what _univ means)
2. when u configure wx, try to add --disable-monolithic , this will yield the multilib version of wx, which include the list of libraries you saw in the ldd

Eran

rodrigo.canellas

  • Guest
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #3 on: September 28, 2007, 12:47:08 am »
Hi,

After 'make clean', I run './configure --disable-monolithic', and the final report was:
"
Configured wxWidgets 2.8.5 for `i686-pc-linux-gnu'

  Which GUI toolkit should wxWidgets use?                 GTK+ 2
  Should wxWidgets be compiled into single library?       no
  Should wxWidgets be compiled in debug mode?             no
  Should wxWidgets be linked as a shared library?         yes
  Should wxWidgets be compiled in Unicode mode?           no
  What level of wxWidgets compatibility should be enabled?
                                       wxWidgets 2.4      no
                                       wxWidgets 2.6      yes
  Which libraries should wxWidgets use?
                                       jpeg               sys
                                       png                sys
                                       regex              sys
                                       tiff               builtin
                                       zlib               sys
                                       odbc               no
                                       expat              sys
                                       libmspack          no
                                       sdl                no

"

After 'make' and 'make install', I run 'ls -l /usr/local/lib/libwx*', and we have:
"
lrwxrwxrwx 1 root staff       19 2007-09-27 19:32 /usr/local/lib/libwx_base-2.8.so -> libwx_base-2.8.so.0
lrwxrwxrwx 1 root staff       23 2007-09-27 19:32 /usr/local/lib/libwx_base-2.8.so.0 -> libwx_base-2.8.so.0.2.0
-rwxr-xr-x 1 root staff  1556170 2007-09-27 19:32 /usr/local/lib/libwx_base-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       23 2007-09-27 19:32 /usr/local/lib/libwx_base_net-2.8.so -> libwx_base_net-2.8.so.0
lrwxrwxrwx 1 root staff       27 2007-09-27 19:32 /usr/local/lib/libwx_base_net-2.8.so.0 -> libwx_base_net-2.8.so.0.2.0
-rwxr-xr-x 1 root staff   239910 2007-09-27 19:32 /usr/local/lib/libwx_base_net-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       23 2007-09-27 19:32 /usr/local/lib/libwx_base_xml-2.8.so -> libwx_base_xml-2.8.so.0
lrwxrwxrwx 1 root staff       27 2007-09-27 19:32 /usr/local/lib/libwx_base_xml-2.8.so.0 -> libwx_base_xml-2.8.so.0.2.0
-rwxr-xr-x 1 root staff    48558 2007-09-27 19:32 /usr/local/lib/libwx_base_xml-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       21 2007-09-27 18:23 /usr/local/lib/libwx_gtk2u_aui-2.8.so.0 -> libwx_gtk2univ-2.8.so
lrwxrwxrwx 1 root staff       23 2007-09-27 18:22 /usr/local/lib/libwx_gtk2univ-2.8.so -> libwx_gtk2univ-2.8.so.0
lrwxrwxrwx 1 root staff       27 2007-09-27 18:22 /usr/local/lib/libwx_gtk2univ-2.8.so.0 -> libwx_gtk2univ-2.8.so.0.2.0
-rwxr-xr-x 1 root staff 10318204 2007-09-27 18:22 /usr/local/lib/libwx_gtk2univ-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       27 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_adv-2.8.so -> libwx_gtk2univ_adv-2.8.so.0
lrwxrwxrwx 1 root staff       31 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_adv-2.8.so.0 -> libwx_gtk2univ_adv-2.8.so.0.2.0
-rwxr-xr-x 1 root staff  1045615 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_adv-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       27 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_aui-2.8.so -> libwx_gtk2univ_aui-2.8.so.0
lrwxrwxrwx 1 root staff       31 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_aui-2.8.so.0 -> libwx_gtk2univ_aui-2.8.so.0.2.0
-rwxr-xr-x 1 root staff   448537 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_aui-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       28 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_core-2.8.so -> libwx_gtk2univ_core-2.8.so.0
lrwxrwxrwx 1 root staff       32 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_core-2.8.so.0 -> libwx_gtk2univ_core-2.8.so.0.2.0
-rwxr-xr-x 1 root staff  5016352 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_core-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       28 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_html-2.8.so -> libwx_gtk2univ_html-2.8.so.0
lrwxrwxrwx 1 root staff       32 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_html-2.8.so.0 -> libwx_gtk2univ_html-2.8.so.0.2.0
-rwxr-xr-x 1 root staff   851019 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_html-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       26 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_qa-2.8.so -> libwx_gtk2univ_qa-2.8.so.0
lrwxrwxrwx 1 root staff       30 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_qa-2.8.so.0 -> libwx_gtk2univ_qa-2.8.so.0.2.0
-rwxr-xr-x 1 root staff   194852 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_qa-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       32 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_richtext-2.8.so -> libwx_gtk2univ_richtext-2.8.so.0
lrwxrwxrwx 1 root staff       36 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_richtext-2.8.so.0 -> libwx_gtk2univ_richtext-2.8.so.0.2.0
-rwxr-xr-x 1 root staff  1148387 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_richtext-2.8.so.0.2.0
lrwxrwxrwx 1 root staff       27 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_xrc-2.8.so -> libwx_gtk2univ_xrc-2.8.so.0
lrwxrwxrwx 1 root staff       31 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_xrc-2.8.so.0 -> libwx_gtk2univ_xrc-2.8.so.0.2.0
-rwxr-xr-x 1 root staff   843469 2007-09-27 19:32 /usr/local/lib/libwx_gtk2univ_xrc-2.8.so.0.2.0

"

Just to be sure... 'ls -l /usr/local/lib/libwx_gtk2u_aui-2.8.so.0' reported:
"
lrwxrwxrwx 1 root staff 21 2007-09-27 18:23 /usr/local/lib/libwx_gtk2u_aui-2.8.so.0 -> libwx_gtk2univ-2.8.so
"

So, the library 'codeblocks' complained about was installed!

I also run 'ldconfig' just in case...

But, when I run 'codeblocks', I still get:
"
codeblocks: error while loading shared libraries: libwx_gtk2u_aui-2.8.so.0: cannot open shared object file: No such file or directory
"

Any other clue?

Anyway, thanks for your help!

Tomorrow I'll try again...







Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #4 on: September 28, 2007, 01:40:52 am »
  Should wxWidgets be compiled in Unicode mode?           no
Is there a reason you are not doing Unicode?
Also, you know wxWidgets 2.8.5 has bugs, right?

Tim S
« Last Edit: September 28, 2007, 01:42:23 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #5 on: September 28, 2007, 05:05:27 am »
The reason why you're getting the missing library error is because it's not in path. Solutions-

1) Add /usr/local/lib to LD_LIBRARY_PATH before launching C::B from shell.
Code
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Or

2) Create a file named wx.conf and just add one line, /usr/local/lib , to it. Now save it to /etc/ld.so.conf.d dir and run ldconfig immediately.

If this dir doesn't exist, then add the dir to /etc/ld.so.conf file and run ldconfig.

Edit1: Oh I just noted (just got up) that you compiled wx in Unicode mode. Configure wx with the following command line (sample, but this is the one I use). :)

Code
./configure --disable-debug --enable-shared --enable-unicode --enable-monolithic --with-gtk=2 --with-regex=builtin
« Last Edit: September 28, 2007, 05:14:06 am by Biplab »
Be a part of the solution, not a part of the problem.

rodrigo.canellas

  • Guest
Re: a little OT: 'configure' options to wxWidgets in Linux
« Reply #6 on: September 28, 2007, 03:14:55 pm »
I have '/usr/local/lib' in '/etc/ld.so.config':

"
root@3[~]# cat /etc/ld.so.conf
/lib
/usr/lib
/usr/i486-linuxlibc1/lib
/usr/local/lib
/usr/lib/mozilla

include /etc/ld.so.conf.d/*.conf
"

And I am using 2.8.5 because, AFAIK, recent C::B needs at least wx 2.8, and 'http://www.wxwidgets.org/downloads/' says it is the last stable release.



Well... I used the './configure --disable-debug --enable-shared --enable-unicode --enable-monolithic --with-gtk=2 --with-regex=builtin', but the result was the same.

I will try to install using 'apt-get', as described in 'http://www.wxwidgets.org/downloads/', and I will let you know the results.

Thanks again!!

rodrigo.canellas

  • Guest
Re: a little OT: 'configure' options to wxWidgets in Linux - SOLVED
« Reply #7 on: September 28, 2007, 04:28:09 pm »
Hi,


I installed the Debian packages, as described in 'http://www.wxwidgets.org/downloads/', and C::B is working fine!

Thanks for your help!!