Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1055 closed defect/bug (invalid)

Compile error on debian stable

Reported by: jamesmikedupont Owned by: KaZeR
Priority: trivial Milestone:
Component: tools Version: git master
Severity: Keywords:
Cc:

Description

[ 1%] Building C object navit/support/glib/CMakeFiles/support_glib.dir/gerror.c.o /home/mdupont/experiments/fosm/navit/navit/support/glib/gerror.c:34: error: static declaration of ‘g_error_new_valist’ follows non-static declaration /usr/include/glib-2.0/glib/gerror.h:51: note: previous declaration of ‘g_error_new_valist’ was here make[2]: * [navit/support/glib/CMakeFiles/support_glib.dir/gerror.c.o] Fehler 1 make[1]: * [navit/support/glib/CMakeFiles/support_glib.dir/all] Fehler 2 make: * [all] Fehler 2

gcc (Debian 4.4.5-8) 4.4.5

Attachments (3)

CMakeOutput.log (56.7 KB) - added by jamesmikedupont 8 years ago.
cmakelog.txt (5.0 KB) - added by jamesmikedupont 8 years ago.
The stdout/err of cmake
CMakeError.log (15.0 KB) - added by jamesmikedupont 8 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by sleske

Hm, that's a bit weird. I cannot reproduce this (don't have an installation of Debian stable handy), but this looks like CMake is trying to compile the stuff under navit/support/glib, even though the "real" GLib is available. The "support" code is meant to replace missing libraries; CMake should disable it automatically if the real thing is found.

On my system (with GLib installed), the initial CMake run prints:

--->>> support
Disabled  espeak ( Default )
Disabled  ezxml ( native Glib found )
Disabled  glib ( native Glib found )

Then support/glib/* is not compiled.

To diagnose this, please post:

  • The output of the first CMake run
  • your versions of GTK+ etc. It's probably easiest if you append the output of dpkg -l|grep "^i" (feel free to remove the names of any private packages you don't want to see posted here).
  • The version of Navit you used (SVN revision)

Also, do the CMake run on a fresh copy of the source code, just in case.

If you can, check in on IRC; problems like this are usually easier to solve interactively.

Changed 8 years ago by jamesmikedupont

Changed 8 years ago by jamesmikedupont

The stdout/err of cmake

Changed 8 years ago by jamesmikedupont

comment:2 Changed 8 years ago by jamesmikedupont

I have attached the output of cmake.

comment:3 Changed 8 years ago by jamesmikedupont

Also I am on irc, user mdupont.

comment:4 Changed 8 years ago by sleske

Ok, the immediate problem is that the GLib support code is enabled in CMake:

--->>> support
   Disabled  espeak ( Default )
   Enabled   ezxml ( User defined )
   Enabled   glib ( User defined )

This is wrong; support/glib should be disabled, as in my example above.

The "User defined" usually means it was set explicitly (using CMake option "-D", or using cmake-gui). Did you build in a completely emtpy directory?

And what's your CMake version?

I'll be on IRC this afternoon (~17h CEST / 15h UTC). Maybe we can find the problem...

comment:5 Changed 8 years ago by jamesmikedupont

mdupont@localhost:~/experiments/fosm/navit-build$ cmake --version cmake version 2.8.2

Building in an empty dir does not work :

mdupont@localhost:~/experiments/fosm/navit-build$ cmake ../navit/ ...... -- Build files have been written to: /home/mdupont/experiments/fosm/navit

mdupont@localhost:~/experiments/fosm/navit-build$ ls cmake_plugin_settings.txt

comment:6 Changed 8 years ago by jamesmikedupont

I found the problem, I ran cmake first before i installed the predeps, then cmake kept the cache files and did not re-check them thank you for your patience and support mike

Last edited 8 years ago by jamesmikedupont (previous) (diff)

comment:7 Changed 8 years ago by jamesmikedupont

  • Component changed from core to tools
  • Priority changed from major to trivial
  • Resolution set to invalid
  • Status changed from new to closed

comment:8 Changed 8 years ago by sleske

Actually, it's arguably a bug that CMake misbehaves after you install dependencies. That's a fairly typical situation after all.

I fixed the CMake scripts to avoid this specific problem (support code being compiled when it's not needed): rev5196.

I also updated the Wiki: http://wiki.navit-project.org/index.php/Navit_SVN_installation_on_Linux#CMake

Note: See TracTickets for help on using tickets.