Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500716 - dev-games/openscenegraph-3.0.1-r1 wrongly assumes that all 64bit arches install in /usr/lib64
Summary: dev-games/openscenegraph-3.0.1-r1 wrongly assumes that all 64bit arches insta...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-08 21:38 UTC by Émeric Maschino
Modified: 2014-02-13 21:23 UTC (History)
2 users (show)

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


Attachments
multilib patch (openscenegraph-3.0.1-r1.ebuild.diff,1.08 KB, patch)
2014-02-10 00:51 UTC, Maciej Mrozowski
Details | Diff
more forceful multilib patch (openscenegraph-3.0.1-cmake.patch,11.13 KB, patch)
2014-02-11 22:23 UTC, Maciej Mrozowski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2014-02-08 21:38:27 UTC
Emerging openscenegraph on ia64 ends up with library being incorrectly installed in /usr/lib64 whereas there's no such /usr/lib64 hierarchy on ia64 and other pure 64-bit arches.

Reproducible: Always

Steps to Reproduce:
1. emerge openscenegraph
2.
3.
Actual Results:  
openscenegraph installed in /usr/lib64

Expected Results:  
openscenegraph should install in /usr/lib

OpenSceneGraph's CMake-based install process relies upon CMAKE_SIZEOF_VOID_P to distinguish between 32 and 64-bit arches and then install library in /usr/lib or /usr/lib64. This scheme is definitely broken on 64-bit arches and should be fixed. Though different, I've reported a similar issue against wxGTK (bug #499984) whose install script also check size of void* to determine between 32 and 64-bit arches. For wxGTK, the fix has been included in ebuild script. I don't know if openscenegraph ebuild can be fixed too or if patching OpenSceneGraph's CMake-based install is required.
Comment 1 Émeric Maschino 2014-02-08 21:48:19 UTC
emerge --info output:

Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.17, 3.10.25-gentoo ia64)
=================================================================
System uname: Linux-3.10.25-gentoo-ia64-Madison-with-gentoo-2.2
KiB Mem:    24987264 total,  23090736 free
KiB Swap:     524272 total,    524272 free
Timestamp of tree: Thu, 06 Feb 2014 23:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo my_ebuilds
ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-mtune=itanium2 -O2 -pipe"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=itanium2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/my_ebuilds"
USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 2 Émeric Maschino 2014-02-08 21:50:07 UTC
emerge -pqv openscenegraph output:

[ebuild   R   ] dev-games/openscenegraph-3.0.1-r1  USE="gif gtk jpeg pdf png qt4 sdl svg tiff truetype wxwidgets zlib -curl -debug -doc -examples -ffmpeg -fltk -fox -gdal -glut -itk -jpeg2k -openexr -openinventor -osgapps -vnc (-xine) -xrandr"
Comment 3 Maciej Mrozowski gentoo-dev 2014-02-10 00:18:15 UTC
Does that happen for any CMake controlled packages as well or OSG is just the one you noticed?
Comment 4 Maciej Mrozowski gentoo-dev 2014-02-10 00:51:36 UTC
Created attachment 369996 [details, diff]
multilib patch

Well, officially we do not support ia64 for that package..
Could you try attached patch?
Comment 5 Émeric Maschino 2014-02-10 19:17:39 UTC
(In reply to Maciej Mrozowski from comment #3)
> Does that happen for any CMake controlled packages as well or OSG is just
> the one you noticed?

At the moment, it's the only CMake-based package that installs incorrectly. But I'm far from having @world installed on my workstation ;-)

     Émeric
Comment 6 Émeric Maschino 2014-02-10 19:26:07 UTC
(In reply to Maciej Mrozowski from comment #4)
> Created attachment 369996 [details, diff] [details, diff]
> multilib patch
> 
> Well, officially we do not support ia64 for that package..
> Could you try attached patch?

I know, that's why I was testing it. There's so many interesting packages not yet supported by ia64 ;-)

Furthermore, I had no problem with OSG on Debian ia64 (installs correctly in /usr/lib there). And I must say that, despite being incorrectly installed on Gentoo ia64, OSG seems to work flawlessly once manually moved to /usr/lib.

I'll try your patch and post the results.

Thanks for your support,

     Émeric


PS: How is it that OpenSceneGraph is in dev-games category and not in sci-libs like VTK? It's more dedicated to scientific vizualisation and vizsim than game engines.
Comment 7 Émeric Maschino 2014-02-10 22:37:13 UTC
(In reply to Émeric Maschino from comment #6)
> (In reply to Maciej Mrozowski from comment #4)
> > Created attachment 369996 [details, diff] [details, diff] [details, diff]
> > multilib patch
> 
> I'll try your patch and post the results.

Nope, it didn't worked: OSG binaries are correctly installed in /usr/bin but libraries are still installed in /usr/lib64. (As a side note, I didn't found any source code installed although I have USE=examples. Don't know how it behaves on other platforms).

I'm not sure to fully understand what's done by your patch. From [1], isn't $(get_libdir) returning lib on x86 and 64-bit platforms, lib32 on x32 and lib64 on amd64? I thus fear that ${libdir/lib} will incorrectly set LIB_POSTFIX to lib/lib, lib32/lib or lib64/lib.

     Émeric


[1] http://devmanual.gentoo.org/archs/amd64/ (I can't find any LIBDIR definition in the various make.defaults files on my system though, so don't know if this documentation is up-to-date and which make.defaults file it was referring to)
Comment 8 Maciej Mrozowski gentoo-dev 2014-02-11 22:23:14 UTC
Created attachment 370188 [details, diff]
more forceful multilib patch

Patche made use of multilib eclass, just like other CMake ebuilds do.
But LIB_POSTFIX it seems cannot be overriden at cmake call even if it's defined as cache variable, strange.. so we need to be more persuasive:

-IF(UNIX AND NOT WIN32 AND NOT APPLE)
-  IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
-      SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
-      MARK_AS_ADVANCED(LIB_POSTFIX)
-  ENDIF()
-ENDIF()
-IF(NOT DEFINED LIB_POSTFIX)
-    SET(LIB_POSTFIX "")
-ENDIF()
+SET(LIB_POSTFIX ${LIB_SUFFIX})

Try another one (revert ebuild changes, instead replace patch in files/ with attached one, remanifest..)
Comment 9 Émeric Maschino 2014-02-12 23:40:51 UTC
(In reply to Maciej Mrozowski from comment #8)
> Created attachment 370188 [details, diff] [details, diff]
> more forceful multilib patch
> 
> Patche made use of multilib eclass, just like other CMake ebuilds do.
> But LIB_POSTFIX it seems cannot be overriden at cmake call even if it's
> defined as cache variable, strange.. so we need to be more persuasive:
> 
> -IF(UNIX AND NOT WIN32 AND NOT APPLE)
> -  IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
> -      SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
> -      MARK_AS_ADVANCED(LIB_POSTFIX)
> -  ENDIF()
> -ENDIF()
> -IF(NOT DEFINED LIB_POSTFIX)
> -    SET(LIB_POSTFIX "")
> -ENDIF()
> +SET(LIB_POSTFIX ${LIB_SUFFIX})
> 
> Try another one (revert ebuild changes, instead replace patch in files/ with
> attached one, remanifest..)

Issue fixed with this patch, thanks :-)

Now emerging again but with tests enabled. Who knows? Maybe openscenegraph could even be ia64 stable!

     Émeric
Comment 10 Émeric Maschino 2014-02-13 07:40:08 UTC
(In reply to Émeric Maschino from comment #9)
> Issue fixed with this patch, thanks :-)
> 
> Now emerging again but with tests enabled. Who knows? Maybe openscenegraph
> could even be ia64 stable!

All tests passed successfully (well, it seems that only media-libs/tiff has testsuite) with the following uses:

longspeak emeric # equery uses openscenegraph
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-games/openscenegraph-3.0.1-r1:
 U I
 - - curl         : Add support for client-side URL transfer library
 - - debug        : Enable extra debug codepaths, like asserts and extra
                    output. If you want to get meaningful backtraces see
                    http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - doc          : Add extra documentation (API, Javadoc, etc). It is
                    recommended to enable per package instead of globally
 + + examples     : Install examples, usually source code
 - - ffmpeg       : Enable ffmpeg-based audio/video codec support
 - - fltk         : Add support for the Fast Light Toolkit gui interface
 - - fox          : <unknown>
 - - gdal         : <unknown>
 + + gif          : Add GIF image support
 - - glut         : Build an OpenGL plugin using the GLUT library
 + + gtk          : Add support for x11-libs/gtk+ (The GIMP Toolkit)
 - - itk          : <unknown>
 + + jpeg         : Add JPEG image support
 - - jpeg2k       : Support for JPEG 2000, a wavelet-based image compression
                    format
 - - openexr      : Support for the OpenEXR graphics file format
 - - openinventor : <unknown>
 + + osgapps      : <unknown>
 + + pdf          : Add general support for PDF (Portable Document Format),
                    this replaces the pdflib and cpdflib flags
 + + png          : Add support for libpng (PNG images)
 + + qt4          : Add support for the Qt GUI/Application Toolkit version 4.x
 + + sdl          : Add support for Simple Direct Layer (media library)
 + + svg          : Add support for SVG (Scalable Vector Graphics)
 + + tiff         : Add support for the TIFF image format
 + + truetype     : Add support for FreeType and/or FreeType2 fonts
 - - vnc          : Enable VNC (remote desktop viewer) support
 + + wxwidgets    : Add support for wxWidgets/wxGTK GUI toolkit
 - - xrandr       : <unknown>
 + + zlib         : Add support for zlib (de)compression

Did you noticed the <unknown> description? That's new to me as I'm sure having read something insightful when I've enabled examples and osgapps flags.

Is it a side effect of patch in attachment #370188 [details, diff]?

     Émeric
Comment 11 Maciej Mrozowski gentoo-dev 2014-02-13 21:23:15 UTC
No, unrelated. Unable to reproduce :P

Thanks for reporting!