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


bug #22890: cmake does not correctly set X_DISPLAY_MISSING

Submitter:  Petr Gotthard <gotthardp>
Submitted:  Thu 10 Apr 2008 09:01:43 AM UTC
Category:  CERTI Severity:  * 3 - Normal
Item Group:  Compilation error Status:  Fixed
Privacy:  Public Assigned to:  erk
Open/Closed:  Closed Release:  * CVS
Reproducibility:  Every Time Fixed Release:  * 3.3.0
* Mandatory Fields

Add a New Comment Rich Markup

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>
Group 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>
Group Member
Wed 23 Apr 2008 09:40:07 PM UTC, comment #4: 

Ok I see
I had never cross that one.

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


In fact I think without the dependency statement
CMake cannot guess if
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



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>
Group administrator
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>
Group 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>
Group 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

Ball.cc:71: undefined reference to `Definecr(point, unsigned long, mode_remp, couleur)

is puzzling since Definecr is a function of libgraphc

Would you try to rebuild CERTI CVS with CMake?

Eric NOULARD <erk>
Group administrator
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>
Group Member


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-07-02 erk StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseCVS 3.3.0
    2008-05-24 erk StatusIn Progress Ready For Test
    2008-04-23 erk StatusReady For Test In Progress
    2008-04-23 erk CategoryNone CERTI
        StatusNone Ready For Test
        Assigned toNone erk
        Fixed ReleaseUnknown CVS

    Back to the top

    Powered by Savane 3.12