Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260102 - sci-physics/geant: Can't compile none of the examples
Summary: sci-physics/geant: Can't compile none of the examples
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-24 09:03 UTC by Matej
Modified: 2009-09-23 16:06 UTC (History)
1 user (show)

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


Attachments
Get rid of some more variables (Update_seding_paths.patch,601 bytes, patch)
2009-02-26 23:13 UTC, Benjamin Bannier
Details | Diff
Add forgotten slash in path (Add-missing-slash-in-path.patch,1.07 KB, patch)
2009-02-27 15:21 UTC, Benjamin Bannier
Details | Diff
patch for r2 to search for qt libs properly (geant4.patch,529 bytes, patch)
2009-03-04 10:46 UTC, Matej
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matej 2009-02-24 09:03:43 UTC
trying to compile example N02:

Making dependency for file exampleN02.cc ...
Making dependency for file src/ExN02TrackerSD.cc ...
Making dependency for file src/ExN02TrackerHit.cc ...
Making dependency for file src/ExN02SteppingVerbose.cc ...
Making dependency for file src/ExN02SteppingAction.cc ...
Making dependency for file src/ExN02RunAction.cc ...
Making dependency for file src/ExN02PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN02PhysicsList.cc ...
Making dependency for file src/ExN02MagneticField.cc ...
Making dependency for file src/ExN02EventAction.cc ...
Making dependency for file src/ExN02DetectorMessenger.cc ...
Making dependency for file src/ExN02DetectorConstruction.cc ...
Making dependency for file src/ExN02ChamberParameterisation.cc ...
Compiling ExN02ChamberParameterisation.cc ...
Compiling ExN02DetectorConstruction.cc ...
Compiling ExN02DetectorMessenger.cc ...
Compiling ExN02EventAction.cc ...
Compiling ExN02MagneticField.cc ...
Compiling ExN02PhysicsList.cc ...
Compiling ExN02PrimaryGeneratorAction.cc ...
Compiling ExN02RunAction.cc ...
Compiling ExN02SteppingAction.cc ...
Compiling ExN02SteppingVerbose.cc ...
Compiling ExN02TrackerHit.cc ...
Compiling ExN02TrackerSD.cc ...
Creating shared library /afs/f9.ijs.si/home/batic/geant4/tmp/Linux-g++/exampleN02/libexampleN02.so ...
Compiling exampleN02.cc ...
In file included from exampleN02.cc:42:
/usr/include/geant/G4RunManager.hh: In member function ‘void G4RunManager::SetRandomNumberStoreDir(G4String)’:
/usr/include/geant/G4RunManager.hh:352: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result
Using granular libraries ...
Linking exampleN02 ...
/afs/f9.ijs.si/home/batic/geant4/tmp/Linux-g++/exampleN02/exe/exampleN02.o: In function `G4VisExecutive::RegisterGraphicsSystems()':
exampleN02.cc:(.text+0x47a): undefined reference to `G4OpenGLImmediateX::G4OpenGLImmediateX()'
exampleN02.cc:(.text+0x49a): undefined reference to `G4OpenGLStoredX::G4OpenGLStoredX()'
exampleN02.cc:(.text+0x4ba): undefined reference to `G4OpenGLImmediateXm::G4OpenGLImmediateXm()'
exampleN02.cc:(.text+0x4da): undefined reference to `G4OpenGLStoredXm::G4OpenGLStoredXm()'
/afs/f9.ijs.si/home/batic/geant4/tmp/Linux-g++/exampleN02/exe/exampleN02.o: In function `main':
exampleN02.cc:(.text+0x855): undefined reference to `G4UIterminal::G4UIterminal(G4VUIshell*, bool)'
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `typeinfo for G4VBasicShell'
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `G4VBasicShell::G4VBasicShell()'
/usr/lib64/geant4/libG4OpenInventor.so: undefined reference to `G4VInteractorManager::SecondaryLoop()'
/usr/lib64/geant4/libG4OpenInventor.so: undefined reference to `G4VInteractorManager::RequireExitSecondaryLoop(int)'
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `G4VBasicShell::~G4VBasicShell()'
collect2: ld returned 1 exit status
make: *** [/afs/f9.ijs.si/home/batic/geant4/bin/Linux-g++/exampleN02] Error 1


If I tried compiling example N01 (without visualisation), I would get just the undefined references to G4UIterminal, G4VBasicShell, ...

emerge -pv geant:4                     
[ebuild   R   ] sci-physics/geant-4.9.2-r1  USE="athena data dawn gdml geant3 motif opengl openinventor qt4 raytracerx vrml zlib -debug -examples -global -minimal -static" 0 kB

emerge --info
Portage 2.2_rc23 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r7 x86_64)
=================================================================                                        
System uname: Linux-2.6.27-gentoo-r7-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2214-with-glibc2.2.5     
Timestamp of tree: Mon, 23 Feb 2009 08:20:01 +0000                                                       
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]                      
ccache version 2.4 [disabled]                                                                            
app-shells/bash:     3.2_p48-r1                                                                          
dev-java/java-config: 1.3.7-r1, 2.1.7                                                                    
dev-lang/python:     2.4.4-r4, 2.5.4-r2                                                                  
dev-python/pycrypto: 2.0.1-r6                                                                            
dev-util/ccache:     2.4-r8                                                                              
dev-util/cmake:      2.6.2-r1                                                                            
sys-apps/baselayout: 2.0.0                                                                               
sys-apps/openrc:     0.4.3-r1                                                                            
sys-apps/sandbox:    1.3.7                                                                               
sys-devel/autoconf:  2.13, 2.63                                                                          
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                            
sys-devel/binutils:  2.19.1                                                                              
sys-devel/gcc-config: 1.4.1                                                                              
sys-devel/libtool:   2.2.6a                                                                              
virtual/os-headers:  2.6.28-r1                                                                           
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                           
CBUILD="x86_64-pc-linux-gnu"                                                                             
CFLAGS="-O2 -march=k8 -pipe"                                                                             
CHOST="x86_64-pc-linux-gnu"                                                                              
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/grid-security/certificates /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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=k8 -pipe"                                                                                                                                                                                                                                                
DISTDIR="/d0/nfs/gentoo/distfiles"                                                                                                                                                                                                                                            
EMERGE_DEFAULT_OPTS="--with-bdeps y"                                                                                                                                                                                                                                          
FEATURES="buildpkg distcc distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                                                                                                  
GENTOO_MIRRORS=" http://ftp.heanet.ie/pub/gentoo ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp.gentoo.skynet.be/pub/gentoo"                                                                                                                        
LANG="en_US.UTF-8"                                                                                                                                                                                                                                                            
LDFLAGS="-Wl,-O1"                                                                                                                                                                                                                                                             
LINGUAS="en sl"                                                                                                                                                                                                                                                               
MAKEOPTS="-j6"
PKGDIR="/d0/nfs/gentoo/packages/amd64.gcc4"
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/desktop-effects /usr/portage/local/layman/xemacs /usr/portage/local/layman/sunrise /usr/portage/local/layman/java-overlay /usr/portage/local/layman/kde-testing /usr/portage/local/layman/vmware /d0/nfs/gentoo/portage.local
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib accessibility accounting acl acpi addressbook admin ads afs aiglx aio akonadi alsa amarok amd64 amr amrnb amrwb ansi ao apache2 applet arts asf athena atlas automount avahi bash-completion bcmath beagle berkdb bidi binfiltblas bluetooth bonjour bonobo branding bzip2 cairo calendar canvas caps cdaudio cdb cddb cdio cdparanoia cdr cern chm cjk clamav clarens cli cmake colordiff console context cpudetection cracklib crciprec crypt css ctype cups curl curlwrappers cvs cyrillic cyrus dan dba dbm dbox2 dbus dc1394 dedicated deprecated designer-plugin device-mapper dga dia dirac directfb diskio divx4linux djvu dlloader doc dri dssi dts dv dvb dvd dvdnav dvdr dvi edl eds elf elisp emacs emacs-w3 enblend enca encode esd exif exiv2 expat extensible eame fastcgi fat fbcon festival ffmpeg fftw filepicker firefox fits flac flatfile float fluidsynth font-server foomaticdb fortran fping freebox freetts ftp fuse gadu galago games gcj gcl gd gdbm gdml geant3 geant4 geolocation gif gimp gimpprint glib glitz gmp gnokie gnuplot gnutls gphoto2 gpm gps graphics graphviz groupwise gsf gstreamer gtk gtk2 gtkhtml guile hal hash hdhomerun hfs howl hpn htmlhandbook humanities hyperestraier ical iconv id3tag idn ieee1394 ifp imagemagick imap imlib inkjar innodb inotify iodbc ipod ipv6 sdnlog ithreads ivtv jack jadetex java java5 javascript jfs jingle joystick jpeg jpeg2k json junit kde kdeprefix kerberos keyring kig-scripting kpathsea krb4 ktts ladspa lapack laptop latex lcd lcms ldap ldap-sasl ldapsam libcaca libclamav libnotify libsamplerate ive lm_sensors logrotate lua lyx lzo mad maps math matroska mbox mcve md5sum mdnsresponder-compat meanwhile messenger mfd-rewrites mhash midi mikmod mime mjpeg mmx mmxext mng modplug mono mozbranding mozdevelop mozilla mozsvg mp2 mp3 mp3tunes mp4 mpeg mpi mplayer p mudflap mule multilib musepack music musicbrainz mysql mysqli nagios-dns nagios-ntp nagios-ping nas nautilus ncurses nemesi network networking networkmanager newxkb njb nls nptl nptlonly nsplugin ntfs nvidia nvtv nxclient objc odbc odk ogg ole omega openal openengl openinventor openmp oscar oss overlays pam pcmcia pcntl pcre pda pdf pdo pear perl perlsuid php pic plasma plotutils png pnm portaudio posix postfix postgres postgresql postscript povray ppds pppd prediction pstricks publishers pulseaudio pvr pythia6 pythia8 pqmake qq qt qt-static qt3 qt3support qt4 quicktime quotas radio rar rdesktop reaa readline redeyes reflection regex reiser4 reiserfs rpc rtc ruby samba sasl sbcl scanner schroedinger science sdl sdl-image seamonkey semantic-desktop sendmail server session sift silercity simplexml skey slang slp smime sms smux sndfile snmp soap sockets solver sound sox speex spell spl sql sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification subtitles subversion suhosin svg sysfs sysvipc t1lib taglib tcltk tcpd teletext tetex tex4ht tgra threads thunderbird tidy tiff tk tokenizer transcode truetype truetype-fonts twolame type1-fonts unicode upnp usb utempter utf8 v4l v4l2 vcd vcdx vhosts vim-syntax visualization vorbis wavpack wddx webdav webkit wifi wmf wmn wxwindows x264 xanim xattr xcb xcompxetex xface xfs xim xine xinerama xml xml2 xmlreader xmlrpc xmlwriter xmp xorg xpm xrootd xscreensaver xsl xulrunner xv xvid xvmc yaz zephyr zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 tel 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 softvolHE2_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 fheaders include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy auth_digest authn_dbd asis cern_meta charset_lite dbd dumpio ident imagemap log_forensic proxy_ajp proxy_balanoxy_connect proxy_ftp proxy_http version substitute" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sl" USERLAND="GNU" VIDEO_CARDS="fbdev g810 mga neomagic nv radeon savage sis tdfx trident vesa vga via vmware voodoo radeonhd v4l"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Besides, there is a typo in geant-4.9.2-r1.ebuild;
line 172 is missing a slash and should be:
G4RADIOACTIVEDATA="${G4DATA}/$(basename ${WORKDIR}/RadioactiveDecay*)"
Comment 1 Matej 2009-02-24 11:09:50 UTC
(In reply to comment #0)
Browsing through emerge log I came across this:

Creating shared library /var/tmp/portage/sci-physics/geant-4.9.2-r1/work/geant4.9.2/tmp/libG4UIcommon.so ...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtCore
collect2: ld returned 1 exit status
distcc[26940] ERROR: compile (null) on localhost failed
make[2]: *** [/var/tmp/portage/sci-physics/geant-4.9.2-r1/work/geant4.9.2/tmp/libG4UIcommon.so] Error 1

The problem is that emerge continues. It might be due to building granular...

I have libQtCore installed and geant depends on it for building g4ui_build_qt_session. Perhaps adding it to rdepend qt4? would help? 
qt4? ( || ( x11-libs/qt:4 x11-libs/qt-gui x11-libs/qt-core ) )

Best,
m
Comment 2 Matej 2009-02-24 11:49:30 UTC
Hmm...

I see that geant4 Configure function only search for libQtCore in /usr/lib or /usr/lib64 (or similar), but doesn't dive into subdirectories. I have libQtCore in /usr/lib/qt4/ hence library is not found.

I am now trying to compile ebuild with symbolic link (cd /usr/lib; ln -s qt4/libQtCore.so) Will let you know.

Best,
m
Comment 3 Matej 2009-02-24 12:23:34 UTC
Nope, it doesn't help:

Creating shared library /var/tmp/portage/sci-physics/geant-4.9.2-r1/work/geant4.9.2/tmp/libG4UIcommon.so ...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
distcc[16161] ERROR: compile (null) on localhost failed
make[2]: *** [/var/tmp/portage/sci-physics/geant-4.9.2-r1/work/geant4.9.2/tmp/libG4UIcommon.so] Error 1


(In reply to comment #2)
> Hmm...
> 
> I see that geant4 Configure function only search for libQtCore in /usr/lib or
> /usr/lib64 (or similar), but doesn't dive into subdirectories. I have libQtCore
> in /usr/lib/qt4/ hence library is not found.
> 
> I am now trying to compile ebuild with symbolic link (cd /usr/lib; ln -s
> qt4/libQtCore.so) Will let you know.
> 
> Best,
> m
> 

Comment 4 Sébastien Fabbro (RETIRED) gentoo-dev 2009-02-26 15:25:40 UTC
Hi,

Thanks for reporting. It looks like the granular libs did not build right. Although the missing Qt libraries problem is fishy, it does not seem to be the problem in building the examples.
Also the ebuild does not use the geant Configure script, which is not easy to automate.
Anyway, hopefully I'll find some time to go over it. So far I can reproduce the problem.

Comment 5 Benjamin Bannier 2009-02-26 23:06:27 UTC
Hi,

looks like this bug is because the library that needs to be linked in doesn't get installed by the ebuild.

When geant-4 got added to the tree I actually checked that some examples work (I believe some of the advanced once were broken back then), so I'd like to blame this on an upstream regression.

Matej: since example01 doesn't use opengl, could you post your error from there in case in doesn't go away?


Patch and rant follow,

Benjamin
Comment 6 Benjamin Bannier 2009-02-26 23:13:20 UTC
Created attachment 183313 [details, diff]
Get rid of some more variables

Well,

since Geant-4 is enterprise software it has some safety mechanisms built-in. When we complain about "Configure being very difficult to automate", we actually just had bothered ourselves since we tried to work around these safety mechanisms.

Geant-4's safety mechanism is highly modular. It employs a multitude of scripts with names like 'architecture, 'common' etc.; but actually these names are of course only to imply some functionality to the user that isn't provided. These scripts are used to set many variables. For added safety and integrity of the build the same variable is set in a multitude of files. Needless to say that these scripts include one another to make sure the source isn't tampered with.

Sometimes the authors of Geant-4 are ironic. Then they e.g. add additional scripts with funny names, like e.g. one moc.gmk script. Notice how this reads backwards 'Come On!'[1]. The incautious user might feel delighted when he believes his ingenious (that's what he must think) attempts to thwart the Geant Security Scripts(TM) look just like if they worked after a new release, and then, just as he is running full of joy, the lace of variables and shell scripts pulls him back, reminding him that he may no roam freely, but shall only stay on the rich fields prepared for him by The Masters of Geant-4 Configure.


Benjamin



[1] Also cf. mock:
   Mock \Mock\, v. t. [imp. & p. p. {Mocked}; p. pr. & vb. n.
     {Mocking}.] [F. moquer, of uncertain origin; cf. OD. mocken
     to mumble, G. mucken, OSw. mucka.]
     [..]
     3. To disappoint the hopes of; to deceive; to tantalize; as,
        to mock expectation.
  
              Thou hast mocked me, and told me lies. --Judg. xvi.
                                                    13.
  
              He will not . . . Mock us with his blest sight, then
              snatch him hence.                     --Milton.
  
     Syn: To deride; ridicule; taunt; jeer; tantalize; disappoint.
          See {Deride}.
Comment 7 Matej 2009-02-27 07:12:54 UTC
Making dependency for file exampleN01.cc ...
Making dependency for file src/ExN01PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN01PhysicsList.cc ...
Making dependency for file src/ExN01DetectorConstruction.cc ...
Compiling ExN01DetectorConstruction.cc ...
Compiling ExN01PhysicsList.cc ...
Compiling ExN01PrimaryGeneratorAction.cc ...
Creating shared library /afs/f9.ijs.si/home/batic/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so ...
Compiling exampleN01.cc ...
In file included from exampleN01.cc:35:
/usr/include/geant/G4RunManager.hh: In member function ‘void G4RunManager::SetRandomNumberStoreDir(G4String)’:
/usr/include/geant/G4RunManager.hh:352: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result
Using granular libraries ...
Linking exampleN01 ...
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `typeinfo for G4VBasicShell'
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `G4VBasicShell::G4VBasicShell()'
/usr/lib64/geant4/libG4OpenInventor.so: undefined reference to `G4VInteractorManager::SecondaryLoop()'
/usr/lib64/geant4/libG4OpenInventor.so: undefined reference to `G4VInteractorManager::RequireExitSecondaryLoop(int)'
/usr/lib64/geant4/libG4UIGAG.so: undefined reference to `G4VBasicShell::~G4VBasicShell()'
collect2: ld returned 1 exit status
make: *** [/afs/f9.ijs.si/home/batic/geant4/bin/Linux-g++/exampleN01] Error 1



Please note also end of my first post:
>Besides, there is a typo in geant-4.9.2-r1.ebuild;
>line 172 is missing a slash and should be:
>G4RADIOACTIVEDATA="${G4DATA}/$(basename ${WORKDIR}/RadioactiveDecay*)"

Best,
m
Comment 8 Benjamin Bannier 2009-02-27 15:19:59 UTC
Hi Matej,

I cannot confirm this on my machine. Did you use the patch I added above? I assume that it didn't hit the tree, yet.

$ CPPVERBOSE=y make
Making dependency for file exampleN01.cc ...
Making dependency for file src/ExN01PrimaryGeneratorAction.cc ...
Making dependency for file src/ExN01PhysicsList.cc ...
Making dependency for file src/ExN01DetectorConstruction.cc ...
g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe -O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4UI_USE_TERMINAL -DG4UI_USE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_VRML -DG4VIS_USE -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -I/usr/include/geant -c -o /home/honk/geant4/tmp/Linux-g++/exampleN01/ExN01DetectorConstruction.o src/ExN01DetectorConstruction.cc
g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe -O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4UI_USE_TERMINAL -DG4UI_USE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_VRML -DG4VIS_USE -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -I/usr/include/geant -c -o /home/honk/geant4/tmp/Linux-g++/exampleN01/ExN01PhysicsList.o src/ExN01PhysicsList.cc
g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe -O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4UI_USE_TERMINAL -DG4UI_USE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_VRML -DG4VIS_USE -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -I/usr/include/geant -c -o /home/honk/geant4/tmp/Linux-g++/exampleN01/ExN01PrimaryGeneratorAction.o src/ExN01PrimaryGeneratorAction.cc
Creating shared library /home/honk/geant4/tmp/Linux-g++/exampleN01/libexampleN01.so ...
g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe -O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4UI_USE_TERMINAL -DG4UI_USE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_VRML -DG4VIS_USE -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -I/usr/include/geant  \
                                                                                                                                           -c -o /home/honk/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o exampleN01.cc
                                                                                                                                           Using granular libraries ...
                                                                                                                                           g++ -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe -O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse -fPIC -DG4OPTIMISE -Iinclude  -I/usr/include -DG4VERBOSE -DG4_STORE_TRAJECTORY -DG4UI_USE_TERMINAL -DG4UI_USE -DG4VIS_USE_DAWNFILE -DG4VIS_USE_HEPREPFILE -DG4VIS_USE_RAYTRACER -DG4VIS_USE_VRMLFILE -DG4VIS_USE_ASCIITREE -DG4VIS_USE_GAGTREE -DG4VIS_USE_OPENGLX -DG4VIS_USE_OPENGLXM -DG4VIS_USE_OPENGL -DG4VIS_USE_RAYTRACERX -DG4VIS_USE_VRML -DG4VIS_USE -I/include -I/usr/X11R6/include -I/usr/include/X11/extensions -I/usr/include/X11 -I/usr/include/geant \
                                                                                                                                                                                                                                                                                      -o /home/honk/geant4/bin/Linux-g++/exampleN01 /home/honk/geant4/tmp/Linux-g++/exampleN01/exe/exampleN01.o  -L/usr/lib -L/usr/lib/geant4 -L/home/honk/geant4/tmp/Linux-g++/exampleN01 -Wl,-rpath /home/honk/geant4/tmp/Linux-g++/exampleN01 \
                                                                                                                                                                                                                                                                                          -lexampleN01  -lG4error_propagation -lG4mctruth -lG4readout -lG4phys_lists -lG4gflash -lG4phys_builders -lG4visHepRep -lG4biasing -lG4geomtext -lG4FR -lG4brep -lG4OpenGL -lG4RayTracer -lG4Tree -lG4VRML -lG4visXXX -lG4vis_management -lG4hadronic_radioactivedecay -lG4decay -lG4UIbasic -lG4UIGAG -lG4UIcommon -lG4emhighenergy -lG4geomBoolean -lG4partadj -lG4muons -lG4empolar -lG4emlowenergy -lG4hadronic_coherent_elastic -lG4xrays -lG4hadronic_binary -lG4partutils -lG4emstandard -lG4had_theo_max -lG4had_muon_nuclear -lG4run -lG4hadronic_interface_ci -lG4hadronic_abrasion -lG4scoring -lG4hadronic_bert_cascade -lG4hadronic_hetcpp_evaporation -lG4hadronic_proc -lG4hadronic_em_dissociation -lG4hadronic_stop -lG4hadronic_hetcpp_utils -lG4hadronic_mgt -lG4hadronic_qmd -lG4hadronic_ablation -lG4hadronic_iso -lG4optical -lG4had_preequ_exciton -lG4hadronic_incl_cascade -lG4parameterisation -lG4had_lll_fis -lG4hadronic_deex_handler -lG4had_neu_hp -lG4had_string_diff -lG4hadronic_leading_particle -lG4hadronic_deex_evaporation -lG4hadronic_deex_gem_evaporation -lG4hadronic_deex_fission -lG4detutils -lG4hadronic_deex_photon_evaporation -lG4hadronic_deex_fermi_breakup -lG4had_string_frag -lG4hadronic_HE -lG4geomdivision -lG4hadronic_qgstring -lG4had_string_man -lG4had_im_r_matrix -lG4hadronic_deex_management -lG4hadronic_LE -lG4hadronic_body_ci -lG4hadronic_RPG -lG4hadronic_deex_util -lG4shortlived -lG4hadronic_xsect -lG4hadronic_deex_multifragmentation -lG4had_mod_util -lG4detscorer -lG4had_mod_man -lG4hadronic_util -lG4transportation -lG4modeling -lG4mesons -lG4event -lG4geombias -lG4tracking -lG4emutils -lG4ions -lG4baryons -lG4leptons -lG4bosons -lG4cuts -lG4detector -lG4specsolids -lG4digits -lG4hits -lG4csg -lG4hepnumerics -lG4navigation -lG4volumes -lG4procman -lG4track -lG4magneticfield -lG4partman -lG4geometrymng -lG4materials -lG4graphics_reps -lG4intercoms -lG4globman   -L/lib -lGLU -lGL -lXm -lXpm -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lSM -lICE  -lCLHEP -lm -lz

I am attaching another path for the slash issue.


Cheers,

Benjamin
Comment 9 Benjamin Bannier 2009-02-27 15:21:09 UTC
Created attachment 183372 [details, diff]
Add forgotten slash in path
Comment 10 Sébastien Fabbro (RETIRED) gentoo-dev 2009-02-27 15:41:01 UTC
Thanks Ben and Matej, I've just commited a patched ebuild in the tree.
Hopefully the problem is gone. Leaving this bug open until confirmation.
Comment 11 Matej 2009-02-27 15:48:41 UTC
Sorry, haven't tried with the patches, yet. Will let you know immediately when I do. 

Best and thanks,
M
Comment 12 Matej 2009-03-02 11:04:11 UTC
Nope. Even building with new patches doesn't help. Still libQtCore is not found, hence libraries that need qt are not build, eventhough qt is among dependencies...

Will add additional info later. Have to run. Bye,
M
Comment 13 Matej 2009-03-02 19:20:50 UTC
Well, as I said, for me the patch doesn't solve the problem. I have searched around and found one possible problem:
Linux-g++.gmk searches for libqtcore here:
100:    QT_SEARCH_LIB1 := $(shell ls  $(QTHOME)/lib/qt$(QT_VERSION)/libq* 2>/dev/null | wc -l )
101:    QT_SEARCH_LIB2 := $(shell ls  $(QTHOME)/lib/libq*  2>/dev/null | wc -l )
Now qt4 has named the libraries like libQt* and not libqt*, so it doesn't find anything here and so doesn't (I suppose) set the libs to /usr/lib/qt4 and flags to -L/usr/lib/qt4 -lQtCore -lQtGui ...

If that is (would be) the case, I have patched ebuild adding
-e "s/libq\*/libq\* \$\(QTHOME\)\/lib\/qt\$\(QT_VERSION\)\/libQ\*/g" \
to sed in Linux*gmk

But then I found another thing: /var/tmp/portage/sci-physics/geant-4.9.2-r3/temp/environment file, which has:
grep -i qt environment
DEPEND=$'>=sci-physics/clhep-2.0.4.2\n\tmotif? ( x11-libs/openmotif )\n\tathena? ( x11-libs/libXaw )\n\tqt4? ( || ( x11-libs/qt:4 x11-libs/qt-gui ) )\n\topeninventor? ( >=media-libs/openinventor-2.1.5.10-r3 )\n\traytracerx? ( x11-libs/libX11 x11-libs/libXmu )\n\topengl? ( virtual/opengl\n\t\t\t  athena? ( x11-libs/Xaw3d )\n\t\t\t  qt4? ( || ( x11-libs/qt:4[opengl] x11-libs/qt-opengl ) ) )\n\tgdml? ( dev-libs/xerces-c )\n\tgeant3? ( sci-physics/geant:3 )\n\tdawn? ( media-gfx/dawn )\n\tzlib? ( sys-libs/zlib )  =sys-devel/automake-1.10*\n\t>=sys-devel/autoconf-2.61 sys-devel/libtool'
IUSE=$'athena +data dawn debug examples gdml geant3 global minimal +motif\n\t+opengl openinventor qt4 +raytracerx static +vrml zlib  debug'
MULTILIB_STRICT_DIRS='/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib'
PKG_CONFIG_PATH=/usr/qt/3/lib64/pkgconfig
QTDIR=/usr/qt/3
RDEPEND=$'>=sci-physics/clhep-2.0.4.2\n\tmotif? ( x11-libs/openmotif )\n\tathena? ( x11-libs/libXaw )\n\tqt4? ( || ( x11-libs/qt:4 x11-libs/qt-gui ) )\n\topeninventor? ( >=media-libs/openinventor-2.1.5.10-r3 )\n\traytracerx? ( x11-libs/libX11 x11-libs/libXmu )\n\topengl? ( virtual/opengl\n\t\t\t  athena? ( x11-libs/Xaw3d )\n\t\t\t  qt4? ( || (x11-libs/qt:4[opengl] x11-libs/qt-opengl ) ) )\n\tgdml? ( dev-libs/xerces-c )\n\tgeant3? ( sci-physics/geant:3 )\n\tdawn? ( media-gfx/dawn )\n\tzlib? ( sys-libs/zlib )  '
USE='amd64 athena data dawn elibc_glibc gdml geant3 kernel_linux motif multilib opengl openinventor qt4 raytracerx userland_GNU vrml zlib'
                type="KDE;Qt"
    use qt4 && export G4UI_BUILD_QT_SESSION=y;
    sed -i -e "/CXXFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CXXFLAGS}:" -e "/FCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${FFLAGS:--O2}:" -e "/CCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CFLAGS}:" -e "s:-Wl,-soname:${LDFLAGS} -Wl,-soname:g" -e "s/libq\*/libq\* \$\(QTHOME\)\/lib\/qt\$\(QT_VERSION\)\/libQ\*/g" config/sys/Linux*gmk || die "flag substitution failed";
declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
declare -x PKG_CONFIG_PATH="/usr/qt/3/lib64/pkgconfig"
declare -x QTDIR="/usr/qt/3"
declare -x USE="amd64 athena data dawn elibc_glibc gdml geant3 kernel_linux motif multilib opengl openinventor qt4 raytracerx userland_GNU vrml zlib"

So it seems to me that for some (or other) reason, my qt homedir is set to /usr/qt/3 (instead of just /usr). Now if this is the case, no wonders that libQtCore is not found, but I have no idea why (and where) this is set.

Hope this helps.

Btw, examples still don't comppile, the error message is still the same. And some (granular) libs are still not built.

Best,
m
Comment 14 Matej 2009-03-03 20:53:48 UTC
Actually, it ebuild compile-d with adding
-e "s/libq\*/lib\[q,Q\]t\*/g" \
to sed in Linux*gmk

Now I am waiting for install to see if everything is ok.
Comment 15 Matej 2009-03-04 10:43:26 UTC
Yes, indeed, now examples N01 and N02 compile (and work). I have added the patch.

Best, 
m
Comment 16 Matej 2009-03-04 10:46:20 UTC
Created attachment 183870 [details, diff]
patch for r2 to search for qt libs properly

diff -u -r /usr/portage/sci-physics/geant/geant-4.9.2-r2.ebuild /d0/nfs/gentoo/portage.local/sci-physics/geant/geant-4.9.2-r3.ebuild
Comment 17 Sébastien Fabbro (RETIRED) gentoo-dev 2009-03-05 20:02:17 UTC
I've just committed fixes for the qt linking (still geant-4.9.2-r2). 
The attached patch above did fix linking, but on qt3, so I did not use it since we link on qt4 only.
Anyway thanks all, closing this one, reopen if you still see the same problems after resync and remerge.
Comment 18 Matej 2009-06-08 07:10:49 UTC
After living happily with locally changed ebuild (using my patch above), our sysadmin sync-ed and rebuild world. Including geant4. 

And I am sad again. 

For our system (with both qt3 and qt4 installed), the new ebuild sci-physics/geant-4.9.2_p01, doesn't work, with the same symptoms as described in this bug.

Best,
Matej
Comment 19 Dmitry Stepankov 2009-06-10 17:22:27 UTC
Hi,

The problem I see now (expecting the Linux-g++.gmk) is on lines 99-101:
Notice that the searched libpath again is with a small letters (libq*)


   ifndef QTLIBPATH
    QT_SEARCH_LIB1 := $(shell ls  $(QTHOME)/lib/qt$(QT_VERSION)/libq* 2>/dev/null | wc -l )
    QT_SEARCH_LIB2 := $(shell ls  $(QTHOME)/lib/libq*  2>/dev/null | wc -l )
    ifneq ($(QT_SEARCH_LIB1),0)
      QTLIBPATH   := /lib/qt$(QT_VERSION)
    endif
    ifneq ($(QT_SEARCH_LIB2),0)
      QTLIBPATH   := /lib
    endif
  endif

--
Regards,
Dmitry
Comment 20 Dmitry Stepankov 2009-06-10 17:26:35 UTC
So, I have modified a /usr/share/geant4/config/sys/Linux-g++.gmk
(even without recompiling a GEANT) and it works for me now.
Comment 21 Dmitry Stepankov 2009-06-10 17:35:15 UTC
Please someone change the ebuild, 
I would be glad to do that but I don't know how ...
Comment 22 Matej 2009-06-10 18:34:08 UTC
That is precisely what my patch (geant4.patch above, https://bugs.gentoo.org/attachment.cgi?id=183870) did.

I have no idea why it didn't make it to the current ebuild, (even after reading comment #17), since it solves the problem. Not with qt3, but with qt3 and qt4 both.

Best,
m

(In reply to comment #21)
> Please someone change the ebuild, 
> I would be glad to do that but I don't know how ...
> 

Comment 23 Giovanni Fattori 2009-07-10 13:08:22 UTC
May be ebuild in src_configure() is missing:
use gdml		&& export G4LIB_BUILD_GDML=y


and somewhere (should add an use flag): export G4ANALYSIS_USE=y
needed for the AIDA analysis


Sorry if I'm wrong.


Comment 24 Sébastien Fabbro (RETIRED) gentoo-dev 2009-09-23 16:06:36 UTC
It should be fixed in the just committed 4.9.2_p02. Thanks all for your input.