Cannot build 1.6.14 on archlinux x86_64 [solved]

Problems getting SL up and running on Linux? Post here.

Moderator: jesse

Post Reply
ganymede
Posts: 5
Joined: Sat Apr 10, 2010 6:45 pm

Cannot build 1.6.14 on archlinux x86_64 [solved]

Post by ganymede »

Hi,

I tried to build and install sooperlooper-1.6.14 on archlinux x86_64, but compilation failed with the following error message :

Code: Select all

g++ -I..   -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2   -I/usr/include/libxml2   -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 
-D_LARGE_FILES -D__WXGTK__ -pthread -march=native -O2 -pipe -D_REENTRANT -Os -fomit-frame-pointer -mmmx -msse -mfpmath=sse -pipe -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 
-I/dev/shm/src/sooperlooper-1.6.14/libs/pbd -I/dev/shm/src/sooperlooper-1.6.14/libs/midi++  -Wl,--hash-style=gnu -Wl,--as-needed -o slgui  gui_app.o main_panel.o app_frame.o pix_button.o 
looper_panel.o loop_control.o time_panel.o slider_bar.o choice_box.o spin_box.o keyboard_target.o keys_panel.o check_box.o midi_bind_panel.o config_panel.o prefs_dialog.o help_window.o 
latency_panel.o ../libslcore.a  -llo -lpthread   -pthread -Wl,--hash-style=gnu -Wl,--as-needed  -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 
-lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8  -lsigc-1.2   -lxml2   /dev/shm/src/sooperlooper-1.6.14/libs/midi++/libmidipp.a 
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a(xml++.o): In function `writenode(_xmlDoc*, XMLNode*, _xmlNode*, int)':
xml++.cc:(.text+0xf05): undefined reference to `xmlNewDocNode'
xml++.cc:(.text+0xf30): undefined reference to `xmlNewChild'
xml++.cc:(.text+0xf67): undefined reference to `xmlNodeSetContentLen'
xml++.cc:(.text+0xf94): undefined reference to `xmlSetProp'
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a(xml++.o): In function `XMLTree::write_buffer() const':
xml++.cc:(.text+0x1093): undefined reference to `xmlKeepBlanksDefault'
xml++.cc:(.text+0x109d): undefined reference to `xmlNewDoc'
xml++.cc:(.text+0x10ab): undefined reference to `xmlSetDocCompressMode'
xml++.cc:(.text+0x10d2): undefined reference to `xmlDocDumpMemory'
xml++.cc:(.text+0x10da): undefined reference to `xmlFreeDoc'
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a(xml++.o): In function `XMLTree::write() const':
xml++.cc:(.text+0x1133): undefined reference to `xmlKeepBlanksDefault'
xml++.cc:(.text+0x113d): undefined reference to `xmlNewDoc'
xml++.cc:(.text+0x114b): undefined reference to `xmlSetDocCompressMode'
xml++.cc:(.text+0x1170): undefined reference to `xmlSaveFormatFile'
xml++.cc:(.text+0x117a): undefined reference to `xmlFreeDoc'
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a(xml++.o): In function `XMLTree::read_buffer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
xml++.cc:(.text+0x1394): undefined reference to `xmlParseMemory'
xml++.cc:(.text+0x13ac): undefined reference to `xmlDocGetRootElement'
xml++.cc:(.text+0x13c0): undefined reference to `xmlFreeDoc'
/dev/shm/src/sooperlooper-1.6.14/libs/pbd/libpbd.a(xml++.o): In function `XMLTree::read()':
xml++.cc:(.text+0x13fd): undefined reference to `xmlKeepBlanksDefault'
xml++.cc:(.text+0x1405): undefined reference to `xmlParseFile'
xml++.cc:(.text+0x141d): undefined reference to `xmlDocGetRootElement'
xml++.cc:(.text+0x1431): undefined reference to `xmlFreeDoc'
collect2: ld a retourné 1 code d'état d'exécution
make[3]: *** [slgui] Erreur 1
make[3]: quittant le répertoire « /dev/shm/src/sooperlooper-1.6.14/src/gui »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /dev/shm/src/sooperlooper-1.6.14/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /dev/shm/src/sooperlooper-1.6.14 »
make: *** [all] Erreur 2
libxml2 and all other dependencies are installed on my system :
- jack 0.118.0
- wxgtk 2.8.10.1
- libsigcpp1.2 1.2.7
- libsndfile 1.0.21
- libsamplerate 0.1.7
- liblo 0.26
- rubberband 1.4
- libxml2 2.7.7

Thank you for your help.
Last edited by ganymede on Mon Apr 12, 2010 7:27 am, edited 1 time in total.
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Cannot build 1.6.14 on archlinux x86_64

Post by jesse »

Do you have the development packages installed for the dependencies also? Looks like in this case it looks like it can't find libxml2 for some reason..... but only at the link stage which is interesting.
ganymede
Posts: 5
Joined: Sat Apr 10, 2010 6:45 pm

Re: Cannot build 1.6.14 on archlinux x86_64

Post by ganymede »

Do you have the development packages installed for the dependencies also?
Yes, because in archlinux there's no difference between "binary" and "development" packages, they're always installed together.

I don't know if it's related, but I noticed that my default CXXFLAGS are not used during compilation :
- I usually set CXXFLAGS to "-march=native -O2 -pipe"
- sooperlooper compiles with "-D_REENTRANT -Os -fomit-frame-pointer -mmmx -msse -mfpmath=sse -pipe"
I also noticed that running './autogen.sh' before './configure' solves this problem :
CXXFLAGS is set based on -D_REENTRANT -O2 -fomit-frame-pointer -pipe -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
Unfortunately, compilation still fails with the same error message...
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Cannot build 1.6.14 on archlinux x86_64

Post by jesse »

OK, it looks like a library ordering issue on that link line. Try manually running the g++ line that is failing, but moving the -lxml2 to the very end. If that works, then we can try fixing it in the makefiles/configure...
ganymede
Posts: 5
Joined: Sat Apr 10, 2010 6:45 pm

Re: Cannot build 1.6.14 on archlinux x86_64

Post by ganymede »

It works !
When I run this command in src/gui/, there's no more error message :

Code: Select all

g++ -I..   -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2   -I/usr/include/libxml2   -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -march=native -O2 -pipe -D_REENTRANT -O2 -fomit-frame-pointer -pipe -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/dev/shm/sooperlooper/src/sooperlooper-1.6.14/libs/pbd -I/dev/shm/sooperlooper/src/sooperlooper-1.6.14/libs/midi++  -Wl,--hash-style=gnu -Wl,--as-needed -o slgui gui_app.o main_panel.o app_frame.o pix_button.o looper_panel.o loop_control.o time_panel.o slider_bar.o choice_box.o spin_box.o keyboard_target.o keys_panel.o check_box.o midi_bind_panel.o config_panel.o prefs_dialog.o help_window.o latency_panel.o ../libslcore.a  -llo -lpthread   -pthread -Wl,--hash-style=gnu -Wl,--as-needed  -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8  -lsigc-1.2    /dev/shm/sooperlooper/src/sooperlooper-1.6.14/libs/midi++/libmidipp.a /dev/shm/sooperlooper/src/sooperlooper-1.6.14/libs/pbd/libpbd.a  -lxml2
I tried to cd to the top directory, type 'make'... and now the program is correctly built (I could launch it without problem).

It would be very nice if you could fix this issue in makefiles/configure, so that I could use a PKGBUILD (file describing the build and installation process for archlinux) to automatically build and install the program. I'll submit an update to the existing (and deprecated) PKGBUILD available in AUR (Archlinux Users Repository) so that it will be available for other users.
Thank you very much for your help.
jesse
Posts: 554
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Cannot build 1.6.14 on archlinux x86_64

Post by jesse »

Try the attached patch to fix the build, and let me know....
Attachments
sl_buildfix.patch.txt
(1.34 KiB) Downloaded 1959 times
ganymede
Posts: 5
Joined: Sat Apr 10, 2010 6:45 pm

Re: Cannot build 1.6.14 on archlinux x86_64

Post by ganymede »

It works :)

BTW I didn't know exactly how to apply the patch 'as is', so I split it into two files :
autogen.sh.diff

Code: Select all

--- autogen.sh  24 Jul 2008 04:17:03 -0000
+++ autogen.sh  12 Apr 2010 00:37:44 -0000
@@ -300,7 +300,7 @@
 BASE_INCLUDES="-I\$SOOPERLOOPER_TOP/libs/pbd -I\$SOOPERLOOPER_TOP/libs/midi++"
 CFLAGS="\$CFLAGS  -I\$SOOPERLOOPER_TOP/libs/pbd -I\$SOOPERLOOPER_TOP/libs/midi++"
 CXXFLAGS="\$CXXFLAGS -I\$SOOPERLOOPER_TOP/libs/pbd -I\$SOOPERLOOPER_TOP/libs/midi++"
-LIBS="\$LIBS \$SOOPERLOOPER_TOP/libs/midi++/libmidipp.a \$SOOPERLOOPER_TOP/libs/pbd/libpbd.a"
+#LIBS="\$LIBS \$SOOPERLOOPER_TOP/libs/midi++/libmidipp.a \$SOOPERLOOPER_TOP/libs/pbd/libpbd.a"
 ])
 EOF
and Makefile.am.diff

Code: Select all

--- src/gui/Makefile.am 5 Feb 2007 12:49:08 -0000       1.24
+++ src/gui/Makefile.am 12 Apr 2010 00:37:44 -0000
@@ -11,7 +11,7 @@
 
 AM_CXXFLAGS = -I.. @LOSC_CFLAGS@ @SIGCPP_CFLAGS@ @XML_CFLAGS@ @WX_CFLAGS@
 
-slgui_LDADD = ../libslcore.a  @LOSC_LIBS@ @WX_LIBS@ @SIGCPP_LIBS@ @XML_LIBS@
+slgui_LDADD = ../libslcore.a @BASE_LIBS@ @LOSC_LIBS@ @WX_LIBS@ @SIGCPP_LIBS@ @XML_LIBS@
 
 slgui_SOURCES = \
        gui_app.cpp \
I applied them with 'patch' :

Code: Select all

patch -p0 autogen.sh <autogen.sh.diff
patch -p0 src/gui/Makefile.am <Makefile.am.diff
Then I ran './autogen.sh', './configure' and 'make'. The build process was successful without errors : sooperlooper, slgui, etc. are built flawlessly.
Thank you very much.
ganymede
Posts: 5
Joined: Sat Apr 10, 2010 6:45 pm

Re: Cannot build 1.6.14 on archlinux x86_64 [solved]

Post by ganymede »

For archlinux users' information, here's an updated PKGBUILD for sooperlooper-1.6.14 based on the existing one on AUR and the two patches :

Code: Select all

# Contributor: Felipe Machado aka arch_audio <machado.felipe@gmail.com>
# based on Johannes Schriewer <jschriewer@gmail.com> package
# G.R.E.A - Grupo Recifense de Estudos do Archlinux (recife's group of archlinux research)

pkgname=sooperlooper
pkgver=1.6.14
pkgrel=1
pkgdesc="SooperLooper is a live looping sampler intended for use with midi pedals."
url="http://essej.net/sooperlooper/"
depends=('jack' 'liblo' 'wxgtk' 'libsigcpp1.2' 'libsndfile' 'libsamplerate' 'libxml2' 'rubberband')
source=(http://essej.net/sooperlooper/$pkgname-$pkgver.tar.gz autogen.sh.diff Makefile.am.diff)
md5sums=('6faace751e59347afd45e3bc5ad6904f' 'bd90e30ae803112eb6c69455dc177692' '601cf6e8a5ecf4aa38a5bd8df0f27ec5')
arch=('i686' 'x86_64')
license=('GPL')

build() {
  cd $srcdir/$pkgname-$pkgver
  cp $srcdir/*.diff .
  patch -p0 autogen.sh <autogen.sh.diff
  patch -p0 src/gui/Makefile.am <Makefile.am.diff
  ./autogen.sh
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$pkgdir install
}
It's working for me...
Post Reply