Author Topic: Build problem for : NassiShneiderman  (Read 22929 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Build problem for : NassiShneiderman
« on: October 31, 2017, 02:59:02 pm »
I have a linux distro where the plug-in fails to build, it can not find the boost system library, I think, because it claims the needed symbols out of that library are not found.

Initially I was suspecting the cause that (when looking into the makeflie) :
Code
libNassiShneiderman_la_LIBADD = ../../../sdk/libcodeblocks.la $(WX_LIBS) $(BOOST_SYSTEM_LIB)

that $(BOOST_SYSTEM_LIB) was empty/not defined and assuming it was not on succeeding builds.

Next I checked another linux distro where it does build, too my surprise there also $(BOOST_SYSTEM_LIB) was empty/not defined.

Anyone else having similar problems ?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Build problem for : NassiShneiderman
« Reply #1 on: October 31, 2017, 03:04:08 pm »
I have a linux distro where the plug-in fails to build, it can not find the boost system library, I think, because it claims the needed symbols out of that library are not found.

Initially I was suspecting the cause that (when looking into the makeflie) :
Code
libNassiShneiderman_la_LIBADD = ../../../sdk/libcodeblocks.la $(WX_LIBS) $(BOOST_SYSTEM_LIB)

that $(BOOST_SYSTEM_LIB) was empty/not defined and assuming it was not on succeeding builds.

Next I checked another linux distro where it does build, too my surprise there also $(BOOST_SYSTEM_LIB) was empty/not defined.

Anyone else having similar problems ?

On, windows someone implied the newest boost version required the boost library to built.
In the past, the parts of Boost used by CB did not require building of the boost libs.

Tim S.
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 LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Build problem for : NassiShneiderman
« Reply #2 on: October 31, 2017, 05:24:36 pm »
Bonjour,
I faced the same problem with 'Kubuntu 16.04-LTS-amd64'  to compile plugins 'C::B-11210'.
I have added packages : 'libboost-dev' and  'libboost-system'  to compile ' NassiShneiderman'.
Good continuation
« Last Edit: October 31, 2017, 05:37:07 pm by LETARTARE »
CB-13515, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.6
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #3 on: November 01, 2017, 12:55:21 am »
Why aren't you posting any error messages?
Now we have to guess what the real error is.
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: Build problem for : NassiShneiderman
« Reply #4 on: November 01, 2017, 09:00:33 am »
will do, when I am at the other machine.

I think it will be like Tim said, now suddenly some boost header only starts to have a dependency on the boost system library which needs to be build. Andthe installed boost versions is indeed a difference on my linux systems.

The fun thing though is that the makefile more or less was already participating that (or someone just did some cpy/paste without knowing why), 1 thing is sure, the Makefile does not search for, or find the value for the $(BOOST_SYSTEM_LIB), because that one is for sure installed on all my linux boxes.

So in the end the plug-in will start to fail to build on more and more linux systems.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #5 on: November 01, 2017, 09:06:03 am »
I did some boost_system fixes recently, because it has already started to fail. But according to my limited knowledge of autotools I did the correct thing.
The BOOST_SYSTEM_LIB variable should be set by the configure script to the correct value.
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: Build problem for : NassiShneiderman
« Reply #6 on: November 01, 2017, 09:14:19 am »
this is the build error:

Code
make[4]: Entering directory '/home/ldco/Codeblocks/trunk/src/plugins/contrib/NassiShneiderman'
/bin/sh ../../../../libtool  --tag=CXX   --mode=link g++  -O2 -ffast-math  -Winvalid-pch -fPIC -fexceptions -module -shared -version-info 0:1:0 -no-undefined -avoid-version -L/usr/lib64 -Wl,--no-undefined  -o libNassiShneiderman.la -rpath /usr/local/lib64/codeblocks/plugins bricks.lo cbEditorPanel.lo commands.lo CParser.lo DataObject.lo FileContent.lo GraphBricks.lo GraphFabric.lo HooverDrawlet.lo InsertBrickTask.lo logger.lo NassiDiagramWindow.lo NassiDropTarget.lo NassiEditorPanel.lo NassiFileContent.lo NassiPlugin.lo NassiView.lo parseactions.lo PasteTask.lo RedHatchDrawlet.lo RedLineDrawlet.lo Task.lo TextCtrl.lo TextCtrlTask.lo TextGraph.lo ../../../sdk/libcodeblocks.la -L/usr/lib64 -pthread   -lwx_gtk2u_aui-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_richtext-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0  /usr/lib64/libboost_system.so.1.65.1  -lpthread -ldl
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/7/crtbeginS.o  .libs/bricks.o .libs/cbEditorPanel.o .libs/commands.o .libs/CParser.o .libs/DataObject.o .libs/FileContent.o .libs/GraphBricks.o .libs/GraphFabric.o .libs/HooverDrawlet.o .libs/InsertBrickTask.o .libs/logger.o .libs/NassiDiagramWindow.o .libs/NassiDropTarget.o .libs/NassiEditorPanel.o .libs/NassiFileContent.o .libs/NassiPlugin.o .libs/NassiView.o .libs/parseactions.o .libs/PasteTask.o .libs/RedHatchDrawlet.o .libs/RedLineDrawlet.o .libs/Task.o .libs/TextCtrl.o .libs/TextCtrlTask.o .libs/TextGraph.o   -Wl,-rpath -Wl,/home/ldco/Codeblocks/trunk/src/sdk/.libs -L/usr/lib64 ../../../sdk/.libs/libcodeblocks.so -lglib-2.0 -lwx_gtk2u_aui-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_richtext-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lpthread -ldl -L/usr/lib64/gcc/x86_64-suse-linux/7 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib64/gcc/x86_64-suse-linux/7/crtfastmath.o /usr/lib64/gcc/x86_64-suse-linux/7/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/crtn.o  -O2 -Wl,--no-undefined -pthread   -pthread -Wl,-soname -Wl,libNassiShneiderman.so -o .libs/libNassiShneiderman.so
.libs/CParser.o: In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
CParser.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0x34): undefined reference to `boost::system::generic_category()'
CParser.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0xb1): undefined reference to `boost::system::generic_category()'
CParser.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei[_ZNK5boost6system14error_category12std_category10equivalentERKSt10error_codei]+0xf1): undefined reference to `boost::system::generic_category()'
.libs/CParser.o: In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
CParser.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0x2f): undefined reference to `boost::system::generic_category()'
CParser.cpp:(.text._ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition[_ZNK5boost6system14error_category12std_category10equivalentEiRKSt15error_condition]+0xc1): undefined reference to `boost::system::generic_category()'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:616: libNassiShneiderman.la] Error 1

As far as I could see no sign of boost system library in the link command (and neither on my working linux boxes)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #7 on: November 01, 2017, 09:20:05 am »
Is this a clean build?
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: Build problem for : NassiShneiderman
« Reply #8 on: November 01, 2017, 10:16:04 am »
4th attempt after a clean build

will remove all and do svn up again ..

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: Build problem for : NassiShneiderman
« Reply #9 on: November 01, 2017, 07:06:53 pm »
fresh svn up ==> same problem.

The makefile/configure scripts are as such not correct. To be inspected.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #10 on: November 01, 2017, 11:33:03 pm »
What version of boost do you have installed?
What is the output of configure?
Have you run the bootstrap script?
Do you have the m4/ax_boost_base.m4 file?
How does it look?
What happens if you print the value of  $(BOOST_SYSTEM_LIB) at the end of configure?
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5519
Re: Build problem for : NassiShneiderman
« Reply #11 on: November 02, 2017, 01:14:32 pm »
boost: .165
ax_boost_vase.m4 : yes

Though that one is not mentioned when running bootstrap
Code
Using 'svn --xml info' to get the revision
Found revision: '11222' '2017-10-31 07:56:18'
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:24: installing './compile'
configure.ac:20: installing './missing'
src/base/tinyxml/Makefile.am: installing './depcomp'

Note that this file is doing stuff and will set BOOST_CPPFLAGS and BOOST_LDFLAGS, it does however do nothing with/for BOOST_SYSTEM_LIB.

During configure we can see passing by : checking for boostlib >= 1.20.0... yes


Modified configure.ac, bootstrap and configure:

   CFLAGS:     -O2 -ffast-math  -fPIC -std=c90
   CXXFLAGS:   -O2 -ffast-math  -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
   BOOST_CPPFLAGS:         -I/usr/include
   BOOST_LDFLAGS:         -L/usr/lib64
   BOOST_SYSTEM_LIB:         


Why confirms my finding this BOOST_SYSTEM_LIB is nowhere set, i think no build script whatsoever even tries to tinf out what it should be.
So I tend the conclude the build scripts have always been incorrect, and we were just lukcy that untill boost 1.65 it seems we did not need to linnk with that library.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #12 on: November 02, 2017, 01:32:22 pm »
If you look at this commit https://github.com/obfuscated/codeblocks_sf/commit/ff3903f86038e4beb7926497061368e1f7e4c35f
you'll see that I just recently added linking to boost_system.
This commit fixes the same problem on my system.
My guess is that on my system another m4 file for boost is found and the one in the repo is not used.
But I'll verify this later today.
(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

  • Lives here!
  • ****
  • Posts: 500
Re: Build problem for : NassiShneiderman
« Reply #13 on: November 02, 2017, 09:16:04 pm »
FYI, the same problem occurs on windows as well, and the reason is indeed Boost 1.65+, my last successful CodeBlocks build was done with Boost 1.64. The plugin uses only the Spirit library which is header only, but because of enabled thread safety this now pulls in a dependency of the System library which needs to be compiled. So either disable thread safety (is it required? can it be disabled?) or link with System.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Build problem for : NassiShneiderman
« Reply #14 on: November 02, 2017, 09:38:35 pm »
Patches for windows, welcome, because I cannot test it.
Preferably linking to boost-system.

I'll post a patch in a minute for the linux build system.
(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!]