News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Installing from Source Code

Started by archman007, March 16, 2019, 09:53:33 PM

Previous topic - Next topic

archman007

Compiling from svn trunk source I get this error.


/usr/bin/ld: /usr/local/lib/libwx_gtk3u_aui-3.1.a(auilib_framemanager.o): relocation R_X86_64_PC32 against symbol `_ZN17wxAuiManagerEvent12ms_classInfoE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:939: libcodeblocks.la] Error 1
make[3]: Leaving directory '/home/archman/devel/codeblocks-code/src/sdk'
make[2]: *** [Makefile:1105: all-recursive] Error 1
make[2]: Leaving directory '/home/archman/devel/codeblocks-code/src/sdk'
make[1]: *** [Makefile:543: all-recursive] Error 1
make[1]: Leaving directory '/home/archman/devel/codeblocks-code/src'
make: *** [Makefile:674: all-recursive] Error 1
archman@archman-B360M-DS3H:~/devel/codeblocks-code$ \

Here is my configuration.

*************************************************
* Code::Blocks source tree has been configured. *
*************************************************

You can now build Code::Blocks by issuing 'make'.
When the build is complete, become root and install
it by issuing 'make install'.

   CFLAGS:     -fPIC -fPIC -std=c90
   CXXFLAGS:    -Winvalid-pch -fPIC -fexceptions
   CPPFLAGS:   -DCB_AUTOCONF  -DCB_PRECOMP -DPIC -I$(top_srcdir)/src/include/tinyxml -DTIXML_USE_STL=YES
   LDFLAGS:    -Wl,--no-undefined
   CXX:        g++
   CC:         gcc

archman@archman-B360M-DS3H:~/devel/codeblocks-code$

I would like to move on to make install but I cannot.
Thanks a ton folks.

oBFusCATed

Most probably you're trying to use a statically build wxgtk.
Why are you trying to use a self-build wxgtk? Why don't you use the system package?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

archman007

Where are the code blocks system packages?  The ones I have tried are busted also.  Need version 17.xx.  The 16.xx version is janky!

oBFusCATed

It seems that you've built yourself wxgtk instead of installing wxgtk-dev and using those. On debian there is an easy way to create packages. Search the internet how to do it. Or inspect our travis file for the commands needed to build a package: https://github.com/obfuscated/codeblocks_sf/blob/master/.travis.yml
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

archman007

Reply oBufsCATed

WxWidgets version 3.1 is loaded and operational.  wxWidgets is not the problem here.

oBFusCATed

Quote from: archman007 on March 17, 2019, 01:36:30 PM
wxWidgets is not the problem here.
I hope you'll find the time later to update this topic when you find out that it is in fact the problem. :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

What does wx list return?

wx-config --list
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

archman007

Here is the output to

archman@archman-B360M-DS3H:~/codeblocks/codeblocks-code$ wx-config --list

    Default config is gtk3-unicode-static-3.1

  Default config will be used for output

Now what do you say is the problem?

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

tigerbeard

Quote from: archman007 on March 17, 2019, 03:43:32 AM
Where are the code blocks system packages?  The ones I have tried are busted also.  Need version 17.xx.  The 16.xx version is janky!

Buidling CodeBlocks itself under Linux is easy. The tricky part is to get wxWidgets Prerequisite right. I found the best resource to be this https://github.com/bluehazzard/codeblocks_sf/wiki/build_linux_mint_18

Its very detailed. If you go though that and compare with what you already have done, you might see what is still missing.
From that description I have successfully build V17.01 based on wxGTK 2.8.12 on a Debian based system (was not Mint).




oBFusCATed

Quote from: tigerbeard on March 19, 2019, 12:33:35 PM
The tricky part is to get wxWidgets Prerequisite right.
This statement is wrong. Checking out wx-master and building with almost default settings gives you perfectly fine wxgtk which could be used for C::B. You have to just use non-default prefix and also pass --with-wx-config which points to this non default prefix.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

sodev

Can't confirm that for CentOS 7. To get a fairly standard build with


./configure --libdir=/usr/local/lib64 --with-gtk=3 --with-cxx=11 --enable-ipv6 --disable-compat30 --disable-unsafe_conv_in_wxstring


i had an extensive try-and-error to figure out the following missing packages:


gtk3-devel
webkitgtk3-devel
libX11-devel
libXinerama-devel
libXxf86vm-devel
libXtst-devel
libSM-devel
mesa-libGL-devel
mesa-libGLU-devel
libsecret-devel
libnotify-devel
cairo-devel
gstreamer1-devel
gstreamer1-plugins-base-devel


Without these i either got hard errors or soft warnings about missing components.

oBFusCATed

For centos there is wxgtk-devel. For ubuntu libwxgtk-dev. Today I've compiled wx-master on a clean ubuntu just by installing libgtk-3-dev...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

tigerbeard

Quote from: oBFusCATed on March 19, 2019, 07:31:13 PM
Quote from: tigerbeard on March 19, 2019, 12:33:35 PM
The tricky part is to get wxWidgets Prerequisite right.
This statement is wrong. Checking out wx-master and building with almost default settings gives you perfectly fine wxgtk which could be used for C::B. You have to just use non-default prefix and also pass --with-wx-config which points to this non default prefix.


Well, I think its not wrong. I have been referring to wxGtk2.8.12. As its a good idea to install that to a non default folder According to BlueHazzrads notes (which worked for me) , you need to patch the configure file , manually, change PATH, edit /etc/ld.so.conf, optionally temporarily purge an old libwxgtk3.0, and do the normal install stuff. At least that counts as tricky for me.  8)

If you have a 3 liner (or whatever liner) working in a clean Ubuntu, as you say would you mind to post it?

oBFusCATed

https://github.com/obfuscated/codeblocks_sf/blob/master/.travis.yml

Doing the steps from this file will give you installable .deb files...It lists all the deps and at the bottom you have the two commands that you have to execute to get them.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]