User forums > General (but related to Code::Blocks)

wxSmith and Valgrind Pluggin Installation

<< < (4/5) > >>

sodev:
If you did this

--- Code: ---./configure --prefix=/opt/wx/3.0
--- End code ---

but get this


--- Code: ---~/devel/trunk$ wx-config --libs

-L/usr/local/lib -pthread   /usr/local/lib/libwx_gtk2u_xrc-3.0.a /usr/local/lib/libwx_gtk2u_qa-3.0.a /usr/local/lib/libwx_baseu_net-3.0.a /usr/local/lib/libwx_gtk2u_html-3.0.a /usr/local/lib/libwx_gtk2u_adv-3.0.a /usr/local/lib/libwx_gtk2u_core-3.0.a /usr/local/lib/libwx_baseu_xml-3.0.a /usr/local/lib/libwx_baseu-3.0.a -lgthread-2.0 -pthread -lX11 -lXxf86vm -lSM -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lpng -lexpat -lwxregexu-3.0 -lwxtiff-3.0 -lwxjpeg-3.0 -lz -ldl -lm

~/devel/trunk$ wx-config --cflags

-I/usr/local/lib/wx/include/gtk2-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread
--- End code ---

then something is severely wrong, because all your stuff should be in /opt/wx/3.0 and not in /usr/local.

Now that you also have also libwxgtk3.0-dev installed, you have at least two wx-config config scripts!

For starters, what does

--- Code: ---which wx-config
--- End code ---
say? And then you need to check what your /usr/local and /opt/wx/3.0 do really contain.

spflanze:
I removed libwxgtk3.0-dev.

Something is indeed wrong. I did set the prefix to "/opt/wx/3.0". But after making wxWidgets I get:

--- Code: --- wx-config --prefix
/usr

--- End code ---
The prefix ends up being /usr instead. What might have gone wrong here? The configure command I used is:

--- Code: --- ../configure --prefix=/opt/wx/3.0  --enable-xrc --enable-monolithic --enable-unicode --with-opengl
wx-config --prefix
--- End code ---
According to:
https://wiki.wxwidgets.org/Compiling_and_getting_started
The shared library is default.

sodev:
As i said, you still might have multiple wx-config scripts and depending on which one gets executed it uses a specific installation by default or can only see a specific set of installations.

So for a start you need to figure out which one is used by calling

--- Code: ---which wx-config
--- End code ---

Then you have to check what these different locations really contain, preferrably remove all duplicates and fix wx-config, which usually is just a symlink to the real script, to point to the correct one.

spflanze:
I did a search for all files named 'wx-config" and found several of them. These were:


--- Code: ---/etc/alternatives/wx-config
/home/stephen/.local/share/Trash/files/wx-config
/home/stephen/devel/wxWidgets-3.0.3/build_gtk3_shared_monolithic_unicode/wx-config
/var/lib/dpkg/alternatives/wx-config
/usr/bin/wx-config
/usr/local/bin/wx-config
/opt/wx/3.0/bin/wx-config
--- End code ---

"/etc/alternatives/wx-config" was a broken link. I removed it.

"which wx-config" returned "/usr/bin/wx-config", which is the wrong prefix, and which is the reason for the difficulty. I removed it.

The script:

--- Code: ---/home/stephen/devel/wxWidgets-3.0.3/build_gtk3_shared_monolithic_unicode/wx-config
--- End code ---
returned the prefix equivalent "~/devel/wxWidgets-3.0.3" which is the directory I built wxWidgets in. I am not sure if this should be deleted so I left it there.

All others returned the wrong prefixes so I deleted them. These ones I removed were likely left over from binary installs of wxWidgets.

In the Instructions at: http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux
there is instruction to execute this command (altered for my circumstance):

--- Code: ---export PATH=/opt/wx/3.0/bin/:$PATH
--- End code ---
This changes the path only temporarily. To make the path survive relog I had prepended the prefix to the path I in the file: /etc/environment so I would not have to do this everytime I run Code::Blocks after a rerun.

The wxWidgets is successful now. And so is the Code::Blocks compile. But when I run Code::Blocks I get the error:


--- Quote ---codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory
--- End quote ---

The file libcodeblocks.so.0 does exist in the path:

--- Code: ---/usr/local/lib/libcodeblocks.so.0
--- End code ---
Code::Blocks cannot find it. I would appreciate any suggestions regarding what to do about it.

Rignt now this is the system path:

--- Code: ---$ echo $PATH
/opt/wx/3.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

--- End code ---

ollydbg:
4.3 Resolving runtime issues
Do you see this section of the wiki page? It describe the same issue as your reported.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version