Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281383 - media-libs/SoQt-1.4.1 configure fails with media-libs/coin-3.1.0
Summary: media-libs/SoQt-1.4.1 configure fails with media-libs/coin-3.1.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 20:48 UTC by Davide Pesavento
Modified: 2009-09-07 01:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log (config.log,59.18 KB, text/plain)
2009-08-13 20:50 UTC, Davide Pesavento (RETIRED)
Details
an attempt to solve coin's javascript problem with #ifdefs (coin-3.1.0-build-without-js.patch,1.08 KB, patch)
2009-08-14 12:32 UTC, Arttu Valo
Details | Diff
patch from upstream (coin-3.1.0-vrml-no-js.patch,1.23 KB, patch)
2009-09-01 10:40 UTC, Arttu Valo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento (RETIRED) gentoo-dev 2009-08-13 20:48:10 UTC
checking for coin-config... /usr/bin//coin-config
checking if we can compile and link with the Coin library... false 
configure: WARNING:
Compilation and/or linking with the Coin main library SDK failed, for
unknown reason. If you are familiar with configure-based configuration
and building, investigate the 'config.log' file for clues.

If you can not figure out what went wrong, please forward the 'config.log'
file to the email address <coin-support@coin3d.org> and ask for help by   
describing the situation where this failed.

configure: error: couldn't compile and link against Coin
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2009-08-13 20:50:46 UTC
Created attachment 201173 [details]
config.log

[...]
configure:25749: checking if we can compile and link with the Coin library
configure:25785: x86_64-pc-linux-gnu-g++ -o conftest -O2 -march=core2 -ggdb -pipe -O2 -march=core2 -ggdb -pipe    -I/usr/include/Inventor/annex -D_REENTRANT -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--no-as-needed -L/usr/lib64 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu conftest.cc -lCoin -lGL -lXext -lSM -lICE -lX11 -ldl -lpthread  >&5
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::addHandler(SoType const&, void* (*)(void*, void*), void (*)(void*, SoField const*, long*), int (*)(void*, long, SoField*))'
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::getEngine(void*)'
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::field2jsval(SoField const*, long*) const'
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::getAutoNodeUnrefState() const'
/usr/lib64/libCoin.so: undefined reference to `spidermonkey'
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::debug()'
/usr/lib64/libCoin.so: undefined reference to `SoJavaScriptEngine::jsval2field(long, SoField*) const'
collect2: ld returned 1 exit status
configure:25791: $? = 1
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2009-08-13 20:53:02 UTC
# emerge -pv coin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] media-libs/coin-3.1.0  USE="-debug -doc -java -javascript -openal" 0 kB


emerge --info:

Portage 2.2_rc38 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r0, 2.6.30-wl-26871-g25e4fbe x86_64)
=================================================================
System uname: Linux-2.6.30-wl-26871-g25e4fbe-x86_64-Intel-R-_Core-TM-2_CPU_T7600_@_2.33GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 13 Aug 2009 18:45:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/                 ftp://ftp.unina.it/pub/linux/distributions/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="it"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --prune-empty-dirs"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/java-overlay /usr/portage/local/pesa"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 audiofile avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cddb cdr cli cracklib crypt curl curlwrappers dbus djvu dri dts dv dvd dvdr emacs emboss encode evo exif expat fam ffmpeg fftw flac fontconfig ftp gd gdbm gif glut gmp gnutls gpm graphviz hal iconv icu idn imagemagick imlib ipod ipv6 isdnlog jabber java5 java6 jingle jpeg jpeg2k kde lame latex lcms ldap libsamplerate lm_sensors lua lzo mad matroska mikmod mmap mmx mng mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses networkmanager nls nptl nptlonly offensive ogg opengl openmp pam pch pcre pdf plasma png policykit ppds pppd pulseaudio qt3support qt4 quicktime readline reflection rss samba sasl sdl session slang sndfile socks5 speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification svg sysfs syslog taglib tcpd theora threads tiff truetype unicode usb v4l2 vcd vorbis wifi wmf x264 xattr xcb xcomposite xine xinerama xml xorg xpm xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="radeonhd vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Arttu Valo 2009-08-13 23:43:25 UTC
Compiles fine here as long as coin is built with USE="javascript" (fails if not). So, the dependency in the ebuild should be changed into something like this:

>=media-libs/coin-2.4.4[javascript]
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2009-08-13 23:51:51 UTC
Yeah, I guessed that. However I don't think SoQt really needs javascript, so a better fix would be changing the configure test to not rely on the availability of some not-always-present functions.
Comment 5 Arttu Valo 2009-08-14 02:45:18 UTC
Ahem, forget my earlier comment. As the error message points out, this is not about SoQt. The problem just appears when trying to link something against coin's lib, which was SoQt in this case. So the problem is in media-libs/coin-3.1.0:

coin's misc/src/SoJavaScriptEngine.cpp has the implementations for the "missing" (undefined) functions -- but only if COIN_HAVE_JAVASCRIPT is defined (i.e., with USE="javascript").

Missing them isn't a problem if nothing uses javascript. Unfortunately there's at least this one src/vrml97/JS_VRMLClasses.cpp. It seems to get always(?) compiled, and its code happily calls SoJavaScriptEngine::getEngine and such functions ...
Comment 6 Arttu Valo 2009-08-14 12:32:10 UTC
Created attachment 201230 [details, diff]
an attempt to solve coin's javascript problem with #ifdefs

Tries to fix compiling coin without js support by adding some #ifdefs. With this patch both coin-3.1.0 and SoQt-1.4.1 compiled fine on a ~amd64 system regardless of USE="javascript" or USE="-javascript" setting for coin. However, that's the limit of testing performed.
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2009-08-17 22:43:16 UTC
In the second hunk of the patch, why have you splitted the "#ifdef HAVE_VRML97" section in two pieces? Wasn't it enough to add a nested "#ifdef COIN_HAVE_JAVASCRIPT" section inside it?
Comment 8 Arttu Valo 2009-08-18 00:11:58 UTC
(In reply to comment #7)
> In the second hunk of the patch, why have you splitted the "#ifdef HAVE_VRML97"
> section in two pieces? Wasn't it enough to add a nested "#ifdef
> COIN_HAVE_JAVASCRIPT" section inside it?

Longer story short: they're now in the same "hierarchy" as I saw in other files (IIRC, e.g., SoJavaScriptEngine.cpp), i.e., js as the outer ifdef check.

But you probably don't need the latter part of the patch (all-vrml97-cpp.cpp changes) at all anyway. The crucial piece is the #ifdef for js inside JS_VRMLClasses.cpp, the rest is just verbosity and fluff.
Comment 9 Maciej Mrozowski gentoo-dev 2009-08-21 18:47:02 UTC
What's wrong with adding coin[javascript] as dependency? It just pulls spidermonkey, it's not a big deal.
I wouldn't strip parts of code I don't know well... (and I don't).
Btw, new Qt4-Coin glue (Quarter) needs coin[javascript] as well - I have ebuild done and can fill bug if you like.
Comment 10 Arttu Valo 2009-08-21 19:53:35 UTC
(In reply to comment #9)
> What's wrong with adding coin[javascript] as dependency?

You'd then probably have to do it for every package depending on coin, not just SoQt-1.4.1. That would be four in portage proper (3 SoQt, 1 SoGtk) and at least one more in overlays (sunrise: openscenegraph), maybe more of which I have no knowledge of.

Alternatively, the javascript USE flag could be removed from coin ebuilds, and coin to be always built with javascript enabled. That probably wouldn't need any changes outside coin's ebuilds and metadata.

But with the current situation (USE="-javascript" allowed for coin), the resulting coin shared library will always be built broken due to the vrml97-side using javascript engine stuff even when javascript support isn't built -- as evidenced in the printout in comment #1.

So, it all boils down to the academic dilemma: quick fix or proper fix. Gentoo QA has scolded my quick fixes enough already in other bugs and I ain't a dev, so I gotta try to do what I can (and sometimes try to push my skills as I'm not that terrific at c/c++ nor autotools, that's why the suggested patch's quality  is what it is -- feel free to see what I did right/wrong and make a better patch if you can).
Comment 11 Davide Pesavento (RETIRED) gentoo-dev 2009-08-21 21:13:44 UTC
Have you contacted upstream about this issue and your proposed fix?
Comment 12 Arttu Valo 2009-08-21 22:17:25 UTC
(In reply to comment #11)
> Have you contacted upstream about this issue and your proposed fix?

I sent them a short email describing (my perceived version of) the problem and referring to this bug. Unfortunately for patches, they'd want an svn trunk checkout, which I'm not going to do now (and even if accepted, it would only likely affect future releases anyway):

http://www.coin3d.org/doc/patches

So maybe some quick fix is the way to go for now, after all? But which one? Removal of the USE-flag, or adding the coin[javascript] dependency to all depending packages?
Comment 13 Davide Pesavento (RETIRED) gentoo-dev 2009-08-21 23:01:51 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Have you contacted upstream about this issue and your proposed fix?
> 
> I sent them a short email describing (my perceived version of) the problem and
> referring to this bug. Unfortunately for patches, they'd want an svn trunk
> checkout, which I'm not going to do now (and even if accepted, it would only
> likely affect future releases anyway):
> 

Not a problem, we can backport the upstream fix.

> So maybe some quick fix is the way to go for now, after all? But which one?
> Removal of the USE-flag, or adding the coin[javascript] dependency to all
> depending packages?
> 

I'd like your patch was applied.
Comment 14 Arttu Valo 2009-09-01 10:40:33 UTC
Created attachment 202855 [details, diff]
patch from upstream

My email was apparently received by an upstream bug-system and turned into an issue/bug. Upstream then promptly checked something about vrml specs and fixed it more than a week ago, I've just been busy elsewhere, so reporting it here has taken more than a week.

The patch compiled fine also for coin-3.1.0, both ways (USE="-javascript" USE="javascript") on my old and trusty amd64 box, and then SoQt emerge no longer fails either -- which incidentally is about as much as I plan to test this.
Comment 15 Víctor Ostorga (RETIRED) gentoo-dev 2009-09-02 14:54:07 UTC
Can you provide a link showing your patch commited into coin VCS?
Thanks
Comment 16 Arttu Valo 2009-09-02 19:14:46 UTC
(In reply to comment #15)
> Can you provide a link showing your patch commited into coin VCS?

The last patch attached was kindly provided from upstream, not by me, and luckily since the vrml code hasn't changed much, seems to compile as such also for the older coin version.

You can see the change over here in files JS_VRMLClasses.cpp and JS_VRMLClasses.h (not sure how you'd like it to be shown):

http://source.coin3d.org/viewvc.py/Coin/trunk/src/vrml97/

It's these two changes:

http://source.coin3d.org/viewvc.py/Coin/trunk/src/vrml97/JS_VRMLClasses.h?r1=12810&r2=13506
http://source.coin3d.org/viewvc.py/Coin/trunk/src/vrml97/JS_VRMLClasses.cpp?r1=13319&r2=13506
Comment 17 Víctor Ostorga (RETIRED) gentoo-dev 2009-09-07 01:25:16 UTC
Thanks for the patch, appliet to media-libs/coin-3.1.0