Package: supercollider
Version: 1:3.4.4-2

A recent rebuild test in Ubuntu for supercollider 1:3.4.4-2 shows that
it fails to build [1], due to restrictions imposed at linking time:

g++ -o build/sclang -Wl,-rpath-link,build -Wl,-rpath-link,/usr/lib
-lreadline Source/lang/LangSource/cmdLineFuncs.o -Lbuild -lsclang
build/libsclang.so: undefined reference to `cwiid_set_rumble'
build/libsclang.so: undefined reference to `uregex_groupCount_44'
build/libsclang.so: undefined reference to `rl_reset_line_state'
build/libsclang.so: undefined reference to `rl_bind_key'
build/libsclang.so: undefined reference to `cwiid_set_mesg_callback'
build/libsclang.so: undefined reference to `rl_event_hook'
build/libsclang.so: undefined reference to `rl_replace_line'
build/libsclang.so: undefined reference to `u_charsToUChars_44'
build/libsclang.so: undefined reference to `rl_set_keyboard_input_timeout'
build/libsclang.so: undefined reference to `rl_redisplay'
build/libsclang.so: undefined reference to `rl_crlf'
build/libsclang.so: undefined reference to `cwiid_set_err'
build/libsclang.so: undefined reference to `cwiid_set_led'
build/libsclang.so: undefined reference to `cwiid_set_rpt_mode'
build/libsclang.so: undefined reference to `rl_basic_word_break_characters'
build/libsclang.so: undefined reference to `rl_readline_name'
build/libsclang.so: undefined reference to `cwiid_close'
build/libsclang.so: undefined reference to `readline'
build/libsclang.so: undefined reference to `cwiid_enable'
build/libsclang.so: undefined reference to `uregex_findNext_44'
build/libsclang.so: undefined reference to `cwiid_open'
build/libsclang.so: undefined reference to `uregex_start_44'
build/libsclang.so: undefined reference to `add_history'
build/libsclang.so: undefined reference to `uregex_open_44'
build/libsclang.so: undefined reference to `uregex_end_44'
build/libsclang.so: undefined reference to `cwiid_disable'
build/libsclang.so: undefined reference to `uregex_setText_44'
build/libsclang.so: undefined reference to `cwiid_get_id'
collect2: ld returned 1 exit status

Readline, libicu and cwiid do not appear to be linked against in the
right order in the build process, which yields the undefined
references above. The same error happens on all architectures we test
[2] (amd64, i386, armel, powerpc), but I suspect it also comes up on
the other architectures in Debian as well.

Attached is a patch that resolves the issue, it would be helpful if
you could include it in your package or review it.

[1] 
https://launchpadlibrarian.net/84969289/buildlog_ubuntu-precise-amd64.supercollider_1%3A3.4.4-2_FAILEDTOBUILD.txt.gz
[2] https://launchpad.net/ubuntu/+source/supercollider/1:3.4.4-2

Kind regards,

Mathieu Trudel-Lapierre <mathieu...@gmail.com>
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu...@ubuntu.com>
Subject: Fixup environment variables used for linking against
 readline, libicu, curl, cwiid.
Last-Update: 2011-11-14

Index: supercollider-3.4.4/common/SConstruct
===================================================================
--- supercollider-3.4.4.orig/common/SConstruct	2011-11-14 19:02:02.133345172 -0500
+++ supercollider-3.4.4/common/SConstruct	2011-11-14 19:06:28.665338281 -0500
@@ -575,6 +575,7 @@
     if PLATFORM == 'darwin' or conf.CheckCHeader('unicode/uregex.h'):
         libraries['libicu'] = Environment(
              LINKFLAGS = '-licui18n -licuuc -licudata',
+             LIBS = [ 'icui18n', 'icuuc', 'icudata' ],
         )
     else:
         print "libicu not found"
@@ -1048,15 +1049,6 @@
     langEnv.Append(
     LINKFLAGS = '-Wl,-rpath-link,build -Wl,-rpath-link,' + FINAL_PREFIX + '/lib')
 
-if env['CURL']:
-    langEnv.Append(CPPDEFINES = ['HAVE_LIBCURL'])
-    merge_lib_info(langEnv, libraries['libcurl'])
-
-if env['READLINE'] and env['LANG'] and env['GPL3']:
-    langEnv.Append(CPPDEFINES = ['HAVE_READLINE'])
-    merge_lib_info(langEnv, libraries['readline'])
-
-
 libsclangEnv = langEnv.Clone(
     PKGCONFIG_NAME = 'libsclang',
     PKGCONFIG_DESC = 'SuperCollider synthesis language library',
@@ -1127,6 +1119,15 @@
 if env['LANG']:
     merge_lib_info(libsclangEnv, libraries['libicu'])
 
+if env['CURL']:
+    langEnv.Append(CPPDEFINES = ['HAVE_LIBCURL'])
+    merge_lib_info(libsclangEnv, libraries['libcurl'])
+
+if env['READLINE'] and env['LANG'] and env['GPL3']:
+    langEnv.Append(CPPDEFINES = ['HAVE_READLINE'])
+    merge_lib_info(libsclangEnv, libraries['readline'])
+
+
 # optional features
 if features['midiapi']:
     merge_lib_info(libsclangEnv, libraries['midiapi'])
@@ -1161,8 +1162,8 @@
     # HAVE_LID does the right thing in SC_LID.cpp source
     libsclangSources += ['Source/lang/LangPrimSource/SC_LID.cpp']
     if features['wii']:
-                libsclangEnv.Append(CPPDEFINES = 'HAVE_WII')
-                libsclangEnv.Append(LINKFLAGS = '-lcwiid')
+                langEnv.Append(CPPDEFINES = 'HAVE_WII')
+                langEnv.Append(LINKFLAGS = '-lcwiid')
         #langEnv.Append(LINKFLAGS = '-lbluetooth')
         #langEnv.Append(CPPPATH = '-I/usr/local/include/libcwiimote-0.4.0/libcwiimote/' ) #FIXME: to proper include directory
     if features['lid']:

Reply via email to