CMake libqt4-dev Multilib problem

Bug #894428 reported by Pascal Spörri
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi Everyone,

I have an already running cmake program that I was unable to compile on oneiric:
(In order to compile it I needed to add the path: /usr/lib/x86_64-linux-gnu/ to LD_LIBRARY_PATH)

cmake_minimum_required(VERSION 2.6.2)
project(BarnesHutGPU_CSELAB)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
set(CUDPP_ROOT_DIR "${CMAKE_SOURCE_DIR}/../cudpp/" CACHE PATH "CUDPP Root dir" FORCE)
find_package(CUDA 4 QUIET REQUIRED)
find_package(CUDPP REQUIRED)

[Some cuda stuff here]
#### QT
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
include_directories(${QT_INCLUDES} ${CUDPP_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../data_import/src/ ${CMAKE_CURRENT_SOURCE_DIR}/../cuda_includes/)
[...]
cuda_add_executable(BarnesHutGPU_CSELAB ${MAIN_SRCS} ${PS_SRCS})
target_link_libraries(BarnesHutGPU_CSELAB ${QT_LIBRARIES} ${CUDPP_LIBRARY})

But somehow cmake has problems detecting the correct qt version:

make[2]: *** No rule to make target `/usr/lib/libQtGui.so', needed by `BarnesHutGPU_CSELAB'. Stop.
make[1]: *** [CMakeFiles/BarnesHutGPU_CSELAB.dir/all] Error 2
make: *** [all] Error 2

libqt4-dev is installed but dpkg -L libqt4-dev shows:

[...]
/usr/lib/x86_64-linux-gnu/libQtNetwork.so
/usr/lib/x86_64-linux-gnu/libQtDBus.so
/usr/lib/x86_64-linux-gnu/libQtDeclarative.so
/usr/lib/x86_64-linux-gnu/libQtTest.so
/usr/lib/x86_64-linux-gnu/libQt3Support.so
/usr/lib/x86_64-linux-gnu/libQtSql.so
/usr/lib/x86_64-linux-gnu/libQtDesigner.so
/usr/lib/x86_64-linux-gnu/libQtCLucene.so
/usr/lib/x86_64-linux-gnu/libQtDesignerComponents.so
/usr/lib/x86_64-linux-gnu/libQtScriptTools.so
/usr/lib/x86_64-linux-gnu/libQtSvg.so
/usr/lib/x86_64-linux-gnu/libQtGui.so
/usr/lib/x86_64-linux-gnu/libQtXmlPatterns.so
/usr/lib/x86_64-linux-gnu/libQtScript.so
/usr/lib/x86_64-linux-gnu/libQtCore.so
/usr/lib/x86_64-linux-gnu/libQtHelp.so
/usr/lib/x86_64-linux-gnu/libQtXml.so

Description: Ubuntu 11.10
Release: 11.10

cmake:
  Installed: 2.8.5-1ubuntu1
  Candidate: 2.8.5-1ubuntu1
  Version table:
 *** 2.8.5-1ubuntu1 0
        500 http://ch.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status
libqt4-dev:
  Installed: 4:4.7.4-0ubuntu8
  Candidate: 4:4.7.4-0ubuntu8
  Version table:
 *** 4:4.7.4-0ubuntu8 0
        500 http://ch.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
michaelz (zillich) wrote :

I have the same problem. And no solution yet - sorry :)
Just wanted to note that I do not have to modify LD_LIBRARY_PATH, as ldconfig is configured correctly to locate libraries:

> cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

Still, the problem persists.
Must be somewhere in FindQt.cmake I assume.

cheers
Michael

Revision history for this message
Pascal Spörri (p.spoerri) wrote : Re: [Bug 894428] Re: CMake libqt4-dev Multilib problem
Download full text (3.5 KiB)

The weird thing is that I'm able to compile it on my desktop, which
was an upgrade from 11.04, but I got the problem on my laptop which is
a fresh install.

On Fri, Nov 25, 2011 at 2:52 PM, michaelz <email address hidden> wrote:
> I have the same problem. And no solution yet - sorry :)
> Just wanted to note that I do not have to modify LD_LIBRARY_PATH, as ldconfig is configured correctly to locate libraries:
>
>> cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
> # Multiarch support
> /lib/x86_64-linux-gnu
> /usr/lib/x86_64-linux-gnu
>
> Still, the problem persists.
> Must be somewhere in FindQt.cmake I assume.
>
> cheers
> Michael
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/894428
>
> Title:
>  CMake libqt4-dev Multilib problem
>
> Status in “cmake” package in Ubuntu:
>  New
>
> Bug description:
>  Hi Everyone,
>
>  I have an already running cmake program that I was unable to compile  on oneiric:
>  (In order to compile it I needed to add the path: /usr/lib/x86_64-linux-gnu/ to LD_LIBRARY_PATH)
>
>  cmake_minimum_required(VERSION 2.6.2)
>  project(BarnesHutGPU_CSELAB)
>  set(CMAKE_BUILD_TYPE Debug)
>  set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
>  set(CUDPP_ROOT_DIR "${CMAKE_SOURCE_DIR}/../cudpp/" CACHE PATH "CUDPP Root dir" FORCE)
>  find_package(CUDA 4 QUIET REQUIRED)
>  find_package(CUDPP REQUIRED)
>
>  [Some cuda stuff here]
>  #### QT
>  find_package(Qt4 REQUIRED)
>  include(${QT_USE_FILE})
>  include_directories(${QT_INCLUDES} ${CUDPP_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../data_import/src/ ${CMAKE_CURRENT_SOURCE_DIR}/../cuda_includes/)
>  [...]
>  cuda_add_executable(BarnesHutGPU_CSELAB ${MAIN_SRCS} ${PS_SRCS})
>  target_link_libraries(BarnesHutGPU_CSELAB ${QT_LIBRARIES} ${CUDPP_LIBRARY})
>
>  But somehow cmake has problems detecting the correct qt version:
>
>  make[2]: *** No rule to make target `/usr/lib/libQtGui.so', needed by `BarnesHutGPU_CSELAB'.  Stop.
>  make[1]: *** [CMakeFiles/BarnesHutGPU_CSELAB.dir/all] Error 2
>  make: *** [all] Error 2
>
>  libqt4-dev is installed but dpkg -L libqt4-dev shows:
>
>  [...]
>  /usr/lib/x86_64-linux-gnu/libQtNetwork.so
>  /usr/lib/x86_64-linux-gnu/libQtDBus.so
>  /usr/lib/x86_64-linux-gnu/libQtDeclarative.so
>  /usr/lib/x86_64-linux-gnu/libQtTest.so
>  /usr/lib/x86_64-linux-gnu/libQt3Support.so
>  /usr/lib/x86_64-linux-gnu/libQtSql.so
>  /usr/lib/x86_64-linux-gnu/libQtDesigner.so
>  /usr/lib/x86_64-linux-gnu/libQtCLucene.so
>  /usr/lib/x86_64-linux-gnu/libQtDesignerComponents.so
>  /usr/lib/x86_64-linux-gnu/libQtScriptTools.so
>  /usr/lib/x86_64-linux-gnu/libQtSvg.so
>  /usr/lib/x86_64-linux-gnu/libQtGui.so
>  /usr/lib/x86_64-linux-gnu/libQtXmlPatterns.so
>  /usr/lib/x86_64-linux-gnu/libQtScript.so
>  /usr/lib/x86_64-linux-gnu/libQtCore.so
>  /usr/lib/x86_64-linux-gnu/libQtHelp.so
>  /usr/lib/x86_64-linux-gnu/libQtXml.so
>
>
>  Description:  Ubuntu 11.10
>  Release:      11.10
>
>  cmake:
>    Installed: 2.8.5-1ubuntu1
>    Candidate: 2.8.5-1ubuntu1
>    Version table:
>   *** 2.8.5-1ubuntu1 0
>          500 http://ch.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
>    ...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cmake (Ubuntu):
status: New → Confirmed
Revision history for this message
Rockroehre (rockroehre) wrote :

I'm having the same problem after a clean install of 12.04:

error msg:
No rule to make target `/usr/lib/libQtGui.so', needed by `foo'. Stop.

cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
# Multiarch support
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

Revision history for this message
Rockroehre (rockroehre) wrote :

Deleting the CMakeCache.txt file for the project fixed it for me.

Revision history for this message
flamboyant (flamboyant) wrote :

Deleting CMakeCache.txt worked for me too.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

closing then, maybe was a cache issue.

Changed in cmake (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.