bugCERTI - Bugs: bug #22890, cmake does not correctly set...

 
 

bug #22890: cmake does not correctly set X_DISPLAY_MISSING

Submitted by:  Petr Gotthard <gotthardp>
Submitted on:  Thu 10 Apr 2008 09:01:43 AM UTC  
 
Category: CERTISeverity: 3 - Normal
Item Group: Compilation errorStatus: Fixed
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: CVS
Reproducibility: Every TimeFixed Release: 3.3.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 23 May 2008 09:30:35 AM UTC, comment #6:

The X_DISPLAY_MISSING related problem is fixed. I will open a new bug report for the LINK_DIRECTORIES related problem.

I think you may close this report.

Petr Gotthard <gotthardp>
Project Member
Thu 24 Apr 2008 09:05:55 AM UTC, comment #5:

Still goes wrong.

All the LINK_DIRECTORIES entries are there, just the order is wrong. I have -L/usr/local/lib -L.../certi/libgraphc, but it should be -L.../certi/libgraphc -L/usr/local/lib to link with the most recent graph library.

Seems that more people had a similar problem with other libraries, but none has a solution. :-(

Petr Gotthard <gotthardp>
Project Member
Wed 23 Apr 2008 09:40:07 PM UTC, comment #4:

Ok I see
I had never cross that one.
I'll use INCLUDE_DIRECTORIES(BEFORE ...)

Concerning wrong library link I think
it can be fixed using an extra

ADD_DEPENDENCIES(billard graph CERTI RTI)
in
test/Billiard/CMakeLists.txt

In fact I think without the dependency statement
CMake cannot guess if
TARGET_LINK_LIBRARIES(billard ... graph CERTI RTI)
concerns the CMake target "graph" of the same project
or the libgraph.a CMake found on the lib path.

I've just checked-in (HEAD) this would you try it?

Another solution may be to add

IF (NOT WIN32)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
ENDIF(NOT WIN32)

in
certi/CMakeLists.txt

this is more "global" but it does not solve
the missing dependency specification and CMake
may try to build billard before graph.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Wed 23 Apr 2008 05:46:11 PM UTC, comment #3:

I found the problem:
In {prefix}/lib I have installed libgraph.a that is compiled using X_DISPLAY_MISSING, but now I'm compiling without X_DISPLAY_MISSING.

Since -L{prefix}/lib is BEFORE -L/{sources}/libgraph, the wrong library is found and an error is generated. Do you know how to convince cmake to put -L/{sources}/libgraph before -L{prefix}/lib? The library in {sources} should be preferrably used for linking.

BTW: I suggest to use INCLUDE_DIRECTORIES(BEFORE ... when including some certi libraries, e.g. in test/Billiard/CMakeLists.txt.

This solves a similar problem for the include search path. Unfortunatelly I don't know if there is a simular solution also for the library search path. Do you?

Petr Gotthard <gotthardp>
Project Member
Wed 23 Apr 2008 12:11:42 PM UTC, comment #2:

Problem presist. I took a fresh new CVS HEAD, used cmake and got the same error as before.

Petr Gotthard <gotthardp>
Project Member
Wed 23 Apr 2008 11:21:47 AM UTC, comment #1:

The appropriate
detection of X11 related header by CMake
should be OK.
This should be fixed in CVS HEAD.

However the error

is puzzling since Definecr is a function of libgraphc
(CERTI/test/libgraphc).

Would you try to rebuild CERTI CVS with CMake?

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Thu 10 Apr 2008 09:01:43 AM UTC, original submission:

I have troubles building the Billiard example using cmake. The cmake doesn't report missing X11/bitmaps. The build fails when the bitmaps are missing.
After fixing this problem the build fails again. Some X libraries are still missing, but I don't know which ones.
CMakeFiles/billard.dir/Ball.o: In function `Ball::erase()':
/root/projects/certi/certi2/test/Billard/Ball.cc:71: undefined reference to `Definecr(point, unsigned long, mode_remp, couleur)'

I have Fedora Core 8, with lesstif-devel and
xorg-x11-xbitmaps installed.

Petr Gotthard <gotthardp>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by gotthardp (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Jul 2008 08:56:01 AM UTCerkStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseCVS=>3.3.0
    Sat 24 May 2008 10:20:34 AM UTCerkStatusIn Progress=>Ready For Test
    Wed 23 Apr 2008 09:40:07 PM UTCerkStatusReady For Test=>In Progress
    Wed 23 Apr 2008 11:21:47 AM UTCerkCategoryNone=>CERTI
      StatusNone=>Ready For Test
      Assigned toNone=>erk
      Fixed ReleaseUnknown=>CVS

    Back to the top


    Powered by Savane 3.1-cleanup1