LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-06-2008, 03:11 PM   #1
guille4ty
LQ Newbie
 
Registered: Feb 2008
Posts: 25

Rep: Reputation: 15
Smile CMake can't load a file


This is my output for when I try to compile the game Boson:
Code:
guille4ty@localhost ~/Desktop/boson-all-0.13/code $ cmake .
CMake Error at CMakeLists.txt:24 (include):
  include could not find load file:

    BosonMisc


CMake Error at CMakeLists.txt:25 (include):
  include could not find load file:

    BosonMacros


-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
CMake Error at CMakeLists.txt:80 (find_package):
  find_package could not find module FindBosonKDE3.cmake or a configuration
  file for package BosonKDE3.

  Adjust CMAKE_MODULE_PATH to find FindBosonKDE3.cmake or set BosonKDE3_DIR
  to the directory containing a CMake configuration file for BosonKDE3.  The
  file will have one of the following names:

    BosonKDE3Config.cmake
    bosonkde3-config.cmake



-- Found Perl: /usr/bin/perl
CMake Error at CMakeLists.txt:87 (include):
  include could not find load file:

    CheckQt3Executables


CMake Error at CMakeLists.txt:88 (check_qt3_executables):
  Unknown CMake command "check_qt3_executables".


-- Configuring done
arghh!!! I had to edit a bit of the CmakeList.txt so it would let me do an in-source build (Because for some reason even if it wasn't in source when I built it it would give me an error), but I don't think it was that that gave me the error. Here's what I edited from the file:

(Just that little section (#2) was edited):

Before:
Code:
project(boson)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2)

# Disallow in-source build
STRING(COMPARE EQUAL "${boson_SOURCE_DIR}" "${boson_BINARY_DIR}" insource)
if(insource)
  MESSAGE(FATAL_ERROR "boson requires an out of source build. Please create a separate build directory and run 'cmake path_to_boson [options]' there.")
endif(insource)


# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
#set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" "${CMAKE_SOURCE_DIR}/cmake/modules/boson")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/boson")

set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)

# Use colored output
set(CMAKE_COLOR_MAKEFILE ON)

# AB: this is for the boson-all release package. code is a subdirectory of it
#     the rest of this file (and CMakeLists.txt in subdirs) assume that
#     CMAKE_SOURCE_DIR==boson_SOURCE_DIR.
set(CMAKE_SOURCE_DIR ${boson_SOURCE_DIR})
set(CMAKE_BINARY_DIR ${boson_BINARY_DIR})

include(BosonMisc)
include(BosonMacros)

# AB: TODO: include in official cmake files?
set(KDE3_XDG_APPS_DIR /share/applications)
set(KDE3_DATA_INSTALL_DIR /share/apps)
set(KDE3_LIB_INSTALL_DIR /lib)
set(KDE3_PLUGIN_INSTALL_DIR ${KDE3_LIB_INSTALL_DIR}/kde3)

# AB: we need this for bodebug. TODO: we should probably use
#                                     KDE3_DATA_INSTALL_DIR/boson/bodebug
#                                     instead
set(KDE3_CONFIG_INSTALL_DIR /share/config)
# AB: TODO: include in official cmake files? (end)

set(BOSON_PLUGIN_INSTALL_DIR ${KDE3_PLUGIN_INSTALL_DIR}/plugins/boson)



# TODO: mark as advanced
option(BOSON_LINK_STATIC
  "link statically to most libraries, like KDE and Qt"
  OFF
)
option(BOSON_USE_DEBUG_PLUGINS
  "use debugging plugins that allow to use new code without restarting boson.  only useful to developers."
  ON
)
option(BOSON_USE_BOMEMORY
  "debug memory usage. this is a very experimental debugging option!"
  OFF
)

if(BOSON_LINK_STATIC)
  set(BOSON_USE_DEBUG_PLUGINS OFF)
endif(BOSON_LINK_STATIC)


# AB: use "0" and "1" in defines, not "OFF" and "ON"
if(BOSON_LINK_STATIC)
  set(BOSON_LINK_STATIC 1)
else(BOSON_LINK_STATIC)
  set(BOSON_LINK_STATIC 0)
endif(BOSON_LINK_STATIC)
if(BOSON_USE_DEBUG_PLUGINS)
  set(BOSON_USE_DEBUG_PLUGINS 1)
else(BOSON_USE_DEBUG_PLUGINS)
  set(BOSON_USE_DEBUG_PLUGINS 0)
endif(BOSON_USE_DEBUG_PLUGINS)


# search packages used by KDE
# AB: FindKDE3.cmake adds compiler flags, but we don't want this.
set(orig_c_flags ${CMAKE_C_FLAGS})
set(orig_cxx_flags ${CMAKE_CXX_FLAGS})
find_package(Qt3 REQUIRED)
find_package(BosonKDE3 REQUIRED)
find_package(Perl REQUIRED)
set(CMAKE_C_FLAGS ${orig_c_flags})
set(CMAKE_CXX_FLAGS ${orig_cxx_flags})

# cmake <= 2.4.2 sometimes catch moc/uic from qt4. make sure that has not
# happened to us.
include(CheckQt3Executables)
check_qt3_executables()

# packages required by boson
# note: we may have more deeper in the directory structure (e.g. python in
#       boson/script)
find_package(OpenGL REQUIRED)

#find_package(Lib3ds REQUIRED)
set(LIB3DS_INCLUDE_DIR "${boson_SOURCE_DIR}/lib3ds")
set(LIB3DS_LIBRARY_DIR "${boson_BINARY_DIR}/lib3ds")
set(LIB3DS_LIBRARY "lib3ds")

# AB: apparently the "REQUIRED" parameter only works if the Find<name>.cmake
#     package supports it.
#     many don't. (the KDE3 package does)

add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS} -DHAVE_CONFIG_H=1)
link_directories(${KDE3_LIB_DIR})


include_directories(
  # AB: kgame MUST be the first include! otherwise an installed libkdegames
  #     version might be used
  #     -> same about CMAKE_CURRENT_SOURCE_DIR here: in case we use
  #        #include <kgame/header.h> instead of #include <header.h>
  ${CMAKE_CURRENT_SOURCE_DIR}/kgame
  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  ${KDE3_INCLUDE_DIR}
  ${QT_INCLUDE_DIR}
)


if(BOSON_LINK_STATIC)
  boson_use_static_qt_and_kde()
endif(BOSON_LINK_STATIC)

# create config.h
#include(ConfigureChecks.cmake)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )


if (UNIX)
   link_directories(/usr/local/lib)
   include_directories(/usr/local/include)
endif (UNIX)


add_custom_target(messages)
# AB: this MUST be the FIRST target that is executed by "make messages" !
add_custom_target(messages-recreate-boson_pot
   COMMAND echo "" > ${CMAKE_BINARY_DIR}/po/boson.pot
)
add_dependencies(messages messages-recreate-boson_pot)


add_subdirectory( lib3ds )
add_subdirectory( bomemory )
add_subdirectory( math )
add_subdirectory( bobmfconverter )
add_subdirectory( bodebug )
add_subdirectory( bogl )
add_subdirectory( kgame )
add_subdirectory( ufo )
add_subdirectory( boson )
add_subdirectory( server )


########### install files ###############

#install_files( /include FILES kde.pot )
#install_files( /include FILES kdelibs_export.h kdemacros.h )
After:
Code:
project(boson)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2)

# Disallow in-source build



# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
#set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" "${CMAKE_SOURCE_DIR}/cmake/modules/boson")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/boson")

set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)

# Use colored output
set(CMAKE_COLOR_MAKEFILE ON)

# AB: this is for the boson-all release package. code is a subdirectory of it
#     the rest of this file (and CMakeLists.txt in subdirs) assume that
#     CMAKE_SOURCE_DIR==boson_SOURCE_DIR.
set(CMAKE_SOURCE_DIR ${boson_SOURCE_DIR})
set(CMAKE_BINARY_DIR ${boson_BINARY_DIR})

include(BosonMisc)
include(BosonMacros)

# AB: TODO: include in official cmake files?
set(KDE3_XDG_APPS_DIR /share/applications)
set(KDE3_DATA_INSTALL_DIR /share/apps)
set(KDE3_LIB_INSTALL_DIR /lib)
set(KDE3_PLUGIN_INSTALL_DIR ${KDE3_LIB_INSTALL_DIR}/kde3)

# AB: we need this for bodebug. TODO: we should probably use
#                                     KDE3_DATA_INSTALL_DIR/boson/bodebug
#                                     instead
set(KDE3_CONFIG_INSTALL_DIR /share/config)
# AB: TODO: include in official cmake files? (end)

set(BOSON_PLUGIN_INSTALL_DIR ${KDE3_PLUGIN_INSTALL_DIR}/plugins/boson)



# TODO: mark as advanced
option(BOSON_LINK_STATIC
  "link statically to most libraries, like KDE and Qt"
  OFF
)
option(BOSON_USE_DEBUG_PLUGINS
  "use debugging plugins that allow to use new code without restarting boson.  only useful to developers."
  ON
)
option(BOSON_USE_BOMEMORY
  "debug memory usage. this is a very experimental debugging option!"
  OFF
)

if(BOSON_LINK_STATIC)
  set(BOSON_USE_DEBUG_PLUGINS OFF)
endif(BOSON_LINK_STATIC)


# AB: use "0" and "1" in defines, not "OFF" and "ON"
if(BOSON_LINK_STATIC)
  set(BOSON_LINK_STATIC 1)
else(BOSON_LINK_STATIC)
  set(BOSON_LINK_STATIC 0)
endif(BOSON_LINK_STATIC)
if(BOSON_USE_DEBUG_PLUGINS)
  set(BOSON_USE_DEBUG_PLUGINS 1)
else(BOSON_USE_DEBUG_PLUGINS)
  set(BOSON_USE_DEBUG_PLUGINS 0)
endif(BOSON_USE_DEBUG_PLUGINS)


# search packages used by KDE
# AB: FindKDE3.cmake adds compiler flags, but we don't want this.
set(orig_c_flags ${CMAKE_C_FLAGS})
set(orig_cxx_flags ${CMAKE_CXX_FLAGS})
find_package(Qt3 REQUIRED)
find_package(BosonKDE3 REQUIRED)
find_package(Perl REQUIRED)
set(CMAKE_C_FLAGS ${orig_c_flags})
set(CMAKE_CXX_FLAGS ${orig_cxx_flags})

# cmake <= 2.4.2 sometimes catch moc/uic from qt4. make sure that has not
# happened to us.
include(CheckQt3Executables)
check_qt3_executables()

# packages required by boson
# note: we may have more deeper in the directory structure (e.g. python in
#       boson/script)
find_package(OpenGL REQUIRED)

#find_package(Lib3ds REQUIRED)
set(LIB3DS_INCLUDE_DIR "${boson_SOURCE_DIR}/lib3ds")
set(LIB3DS_LIBRARY_DIR "${boson_BINARY_DIR}/lib3ds")
set(LIB3DS_LIBRARY "lib3ds")

# AB: apparently the "REQUIRED" parameter only works if the Find<name>.cmake
#     package supports it.
#     many don't. (the KDE3 package does)

add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS} -DHAVE_CONFIG_H=1)
link_directories(${KDE3_LIB_DIR})


include_directories(
  # AB: kgame MUST be the first include! otherwise an installed libkdegames
  #     version might be used
  #     -> same about CMAKE_CURRENT_SOURCE_DIR here: in case we use
  #        #include <kgame/header.h> instead of #include <header.h>
  ${CMAKE_CURRENT_SOURCE_DIR}/kgame
  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
  ${KDE3_INCLUDE_DIR}
  ${QT_INCLUDE_DIR}
)


if(BOSON_LINK_STATIC)
  boson_use_static_qt_and_kde()
endif(BOSON_LINK_STATIC)

# create config.h
#include(ConfigureChecks.cmake)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )


if (UNIX)
   link_directories(/usr/local/lib)
   include_directories(/usr/local/include)
endif (UNIX)


add_custom_target(messages)
# AB: this MUST be the FIRST target that is executed by "make messages" !
add_custom_target(messages-recreate-boson_pot
   COMMAND echo "" > ${CMAKE_BINARY_DIR}/po/boson.pot
)
add_dependencies(messages messages-recreate-boson_pot)


add_subdirectory( lib3ds )
add_subdirectory( bomemory )
add_subdirectory( math )
add_subdirectory( bobmfconverter )
add_subdirectory( bodebug )
add_subdirectory( bogl )
add_subdirectory( kgame )
add_subdirectory( ufo )
add_subdirectory( boson )
add_subdirectory( server )


########### install files ###############

#install_files( /include FILES kde.pot )
#install_files( /include FILES kdelibs_export.h kdemacros.h )
 
Old 08-09-2008, 08:04 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Build info is here :
http://boson.eu.org/install.php
(you will need a "build directory" outside boson.)

** 'cd Desktop/build-boson/'
** and then command 'cmake ../boson-all-0.13/'

Other methods will cause various errors.

* Dedendencies : openal (libopenal-devel)

Compile boson slack-12, Ubuntu 8.04, error from :
/boson-all-0.13/code/boson/info/boinfo_linux.cpp
line 75, changed to :
Quote:
#ifdef UTS_RELEASE
kernelVersion = UTS_RELEASE;
insert(BoInfo::OSVersionString + BoInfo::CompileOffset, kernelVersion);
#endif
(the above code : from patching ... see later)

Errors slack-12, Ubuntu 8.04, PCLinuxOS2007 :
Quote:
[ 88%] Building CXX object code/boson/programs/CMakeFiles/bocommandframetester.dir/bocommandframetestermain.o
[ 88%] Building CXX object code/boson/programs/CMakeFiles/bocommandframetester.dir/mainnogui.o
make[2]: *** No rule to make target `/usr/lib/python2.5/config/libpython2.5.a -lpthread -ldl -lutil -lm', needed by `code/boson/programs/bocommandframetester'. Stop.
make[1]: *** [code/boson/programs/CMakeFiles/bocommandframetester.dir/all] Error 2
No luck finding a workaround.
I did try to use the 2 patches, mentioned later.
To apply a patch e.g.: 'patch -p0 < boson_0.13-4.diff'

There are packages, version 0.13, and patches here :

patch, line 3 from the bottom :
http://archive.ubuntu.uasw.edu/pool/universe/b/boson/
including all packages.

patch : [boson_0.13-4.diff.gz] Debian Lenny
http://packages.debian.org/lenny/games/boson
and again packages.

Packages for rpm, version 0.13, Suse 10, PCLinuxOS,
Mandriva 2007..2008 :
http://rpm.pbone.net/index.php3
... use "Search" > Advanced RPM Search, please.

Good Luck !

P.S.: The patches will probably only be useful
when building a Debian package.

Last edited by knudfl; 08-10-2008 at 05:22 AM. Reason: PS
 
Old 08-10-2008, 05:35 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
To apply the patches :
1) rename the "code" directory to 'boson-0.13'
and first apply the Debian patch, which will
create a directory //debian/patches and then
2) the ubuntu patch, which will also put
the files from //debian/patches in place.
3) Rename 'boson-0.13' back to 'code'

I edited #2 to show one of the patch results.

But the "python error" is still there.
So suggest : Try out one of the already build
packages, mentioned in #2.

Regards

Last edited by knudfl; 08-12-2008 at 08:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Doomsday Cmake problem Polantaris Linux - Games 2 05-31-2013 11:46 PM
Passing cmake variables in a src2pkg script... Lufbery Slackware 24 08-05-2008 02:21 PM
CMake error: QT qmake not found sean_zhang Linux - Software 4 02-19-2008 11:34 AM
LXer: Using eCos with CMake LXer Syndicated Linux News 0 11-28-2006 01:24 AM
installation of 'cmake' software soupy Linux - Newbie 2 08-01-2005 01:59 AM


All times are GMT -5. The time now is 11:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration