Author Topic: Installing from Source Code  (Read 8306 times)

Offline archman007

  • Multiple posting newcomer
  • *
  • Posts: 11
Installing from Source Code
« on: March 16, 2019, 09:53:33 pm »
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.
« Last Edit: March 16, 2019, 09:56:34 pm by archman007 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #1 on: March 16, 2019, 11:12:56 pm »
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!]

Offline archman007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Installing from Source Code
« Reply #2 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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #3 on: March 17, 2019, 08:07:44 am »
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!]

Offline archman007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Installing from Source Code
« Reply #4 on: March 17, 2019, 01:36:30 pm »
Reply oBufsCATed

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #5 on: March 17, 2019, 02:51:33 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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Installing from Source Code
« Reply #6 on: March 17, 2019, 11:42:17 pm »
What does wx list return?
Code
wx-config --list
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 archman007

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Installing from Source Code
« Reply #7 on: March 18, 2019, 12:29:31 am »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #8 on: March 18, 2019, 12:45:48 am »
gtk3-unicode-static-3.1
(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!]

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 186
Re: Installing from Source Code
« Reply #9 on: March 19, 2019, 12:33:35 pm »
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).


 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #10 on: March 19, 2019, 07:31:13 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!]

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Installing from Source Code
« Reply #11 on: March 19, 2019, 08:02:56 pm »
Can't confirm that for CentOS 7. To get a fairly standard build with

Code
./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:

Code
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #12 on: March 19, 2019, 08:12:15 pm »
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!]

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 186
Re: Installing from Source Code
« Reply #13 on: March 20, 2019, 12:02:07 am »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Installing from Source Code
« Reply #14 on: March 20, 2019, 12:18:43 am »
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!]