GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [fixed] cmake bug in EvtGen
[fixed] cmake bug in EvtGen [message #11206] Mon, 22 November 2010 13:29 Go to next message
Malgorzata Gumberidze is currently offline  Malgorzata Gumberidze
Messages: 98
Registered: June 2005
continuous participant
From: *in2p3.fr
Trying to install pandaroot. I go following message right after
cmake:

Toggle Spoiler


CMake Error: Error Target: EvtGen Contains more than one Prefered language: Fortran and CXX
You must set the LINKER_LANGUAGE property for this target.


to fix it, it is neceseary to make following changes in the EvtGen/CMakeList.txt:

 
sudol@ipnei14:/projet/panda/pandaroot/jan10/buildPanda$ svn diff  ../trunk/pgenerators/EvtGen/CMakeLists.txt 
Index: ../trunk/pgenerators/EvtGen/CMakeLists.txt
===================================================================
--- ../trunk/pgenerators/EvtGen/CMakeLists.txt	(revision 10338)
+++ ../trunk/pgenerators/EvtGen/CMakeLists.txt	(working copy)
@@ -294,12 +294,12 @@
 add_library(EvtGen SHARED ${EVTGEN_SRCS})
 target_link_libraries(EvtGen ${ROOT_LIBRARIES} Pythia6 Photos ${Fortran_UseLib})
 set_target_properties(EvtGen PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES})
-set_target_properties(EvtGen PROPERTIES LINK_FLAGS "-fPIC")
+set_target_properties(EvtGen PROPERTIES LINK_FLAGS "-fPIC" LINKER_LANGUAGE CXX)

 foreach(program ${ALLEvtGen_exe})
 	add_executable(EvtGen_exe_${program} ${program}.cc)
 	set_target_properties(EvtGen_exe_${program} PROPERTIES OUTPUT_NAME ${program})
-	set_target_properties(EvtGen_exe_${program} PROPERTIES LINK_FLAGS "-fPIC")
+	set_target_properties(EvtGen_exe_${program} PROPERTIES LINK_FLAGS "-fPIC" LINKER_LANGUAGE CXX)
 	target_link_libraries(EvtGen_exe_${program} ${ROOT_LIBRARIES} EvtGen Pythia6 Photos ${Fortran_UseLib} CLHEP)
 endforeach(program)



I do not know if this fix works for everybody, it would be nice if expert can check it, and commit solution to svn.

gosia

[Updated on: Mon, 22 November 2010 14:09]

Report message to a moderator

Re: cmake bug in EvtGen [message #11207 is a reply to message #11206] Mon, 22 November 2010 13:36 Go to previous messageGo to next message
Malgorzata Gumberidze is currently offline  Malgorzata Gumberidze
Messages: 98
Registered: June 2005
continuous participant
From: *in2p3.fr
it seams that cmake is working, but i have new problem :
[ 18%] Built target DpmEvtGen_exe
Scanning dependencies of target Photos
make[2]: *** No rule to make target `of.mod.proxy', needed by `pgenerators/EvtGen/photos/CMakeFiles/Photos.dir/phomak.o.requires'.  Stop.
make[1]: *** [pgenerators/EvtGen/photos/CMakeFiles/Photos.dir/all] Error 2
make: *** [all] Error 2


can someone help me with that ?

gosia

ps. i'm using 64-bit machine with ubuntu and gcc 4.2.4

[Updated on: Mon, 22 November 2010 13:38]

Report message to a moderator

Re: cmake bug in EvtGen [message #11209 is a reply to message #11207] Mon, 22 November 2010 13:48 Go to previous messageGo to next message
Sverre Dørheim is currently offline  Sverre Dørheim
Messages: 23
Registered: October 2008
Location: Munich
occasional visitor
From: *e18.physik.tu-muenchen.de
Hello Gosia

Are you using the CMake from the external packages or an older version. This problem usually occurs when using CMake 2.4.* and not the version from the external packages (2.6.3).

Cheers
Sverre
Re: cmake bug in EvtGen [message #11210 is a reply to message #11209] Mon, 22 November 2010 14:08 Go to previous messageGo to next message
Malgorzata Gumberidze is currently offline  Malgorzata Gumberidze
Messages: 98
Registered: June 2005
continuous participant
From: *in2p3.fr
Hi,

You were right, i was using cmake from my own /user/bin
which is 2.4-path7, after correcting it compiling.
It also fix problem with photos, which i mention in my other message.

The problem is that cmake from pandaroot is not taken
automatically as default cmake. Maybe warning message
could be helpful.

thanks a lot
gosia
Re: cmake bug in EvtGen [message #11211 is a reply to message #11210] Mon, 22 November 2010 14:21 Go to previous messageGo to next message
Felix Boehmer is currently offline  Felix Boehmer
Messages: 149
Registered: May 2007
Location: Munich
first-grade participant

From: *natpool.mwn.de
Hi gosia,

I agree. Since one can very easily set version requirements in the CMakeLists, I think this should be done to get rid of these kind of problems.

Regards

Felix

Re: cmake bug in EvtGen [message #11212 is a reply to message #11211] Mon, 22 November 2010 14:48 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi

This is implemented in the main CMakeLists.txt. The minimal version required is 2.4.3. You only have to change this version.

Ciao

Florian
Re: cmake bug in EvtGen [message #11213 is a reply to message #11212] Mon, 22 November 2010 15:03 Go to previous messageGo to next message
Felix Boehmer is currently offline  Felix Boehmer
Messages: 149
Registered: May 2007
Location: Munich
first-grade participant

From: *natpool.mwn.de
Sure,

but the point was to help the user to avoid falling into that pitfall in the first place (it didn't happen for the first time), so leaving this modification to the user kind of goes full circle to the initial problem Smile
It should be rather easy to make this modification "official".

Regards

Felix
Re: cmake bug in EvtGen [message #11214 is a reply to message #11213] Mon, 22 November 2010 16:14 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi Felix

I didn't meant that this should be done by the user. This should be done by some Panda developer. I will not change this, because afterwards there will be many complains that the build system is not working (from my experience) and so on. If
it is officially decided and i am asked to change it i will do so.

Ciao

Florian
Re: cmake bug in EvtGen [message #11223 is a reply to message #11214] Tue, 23 November 2010 00:02 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi Florian,

Do you foresee any incompatibilities with this change? To me it looks pretty harmless. But then again, you have more experiences with this....

Johan
Re: cmake bug in EvtGen [message #11224 is a reply to message #11223] Tue, 23 November 2010 07:06 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *pools.arcor-ip.net
Hi Johan

I don't expect problems concerning the code. I expect problems with users still using a old version of cmake which will complain after the change because their cmake isn't working any longer. So it's more a social than a technical problem.

Ciao

Florian
Re: cmake bug in EvtGen [message #11225 is a reply to message #11224] Tue, 23 November 2010 10:24 Go to previous message
Malgorzata Gumberidze is currently offline  Malgorzata Gumberidze
Messages: 98
Registered: June 2005
continuous participant
From: *in2p3.fr
by the way i have tried to launch nightly build today and i got following message:

sudol@ipnei14:/projet/panda/pandaroot/jan10/dart/trunk$ ./Dart_gosia.sh Nightly
************************
Tue Nov 23 10:19:19 CET 2010
LABEL:  Ubuntu64-GNU_Linux-x86_64-gcc4.2.4-fairsoft_jan10
SITE:  ipnei14
Model:  Nightly
Nr. of processes:  2
************************
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_BACKWARDS_COMPATIBILITY
Run dashboard with model Nightly


is it normal ?

gosia
Previous Topic: Memory leaks in digitization (TPC!)
Next Topic: Updates in CMakeLists and g3Config
Goto Forum:
  


Current Time: Fri Apr 19 12:50:21 CEST 2024

Total time taken to generate the page: 0.00772 seconds