View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015623CMakeCMakepublic2015-06-18 09:042016-01-04 11:51
ReporterEric Wing 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformRaspberry PiOSRaspbian (Debian Linux)OS Version3.18.11
Product VersionCMake 3.2.3 
Target VersionFixed in Version 
Summary0015623: Raspbian puts some system libraries in /usr/lib/arm-linux-gnueabihf which CMake doesn't search
DescriptionRaspbian, which is a streamlined offshoot of Debian for Raspberry Pi, puts a lot of system libraries in /usr/lib/arm-linux-gnueabihf, which CMake doesn't search for by default.

Some popular libraries include libpng, libjpeg, libcurl, openal, sdl, avahi, freetype, and a lot more.

When trying to build on a Raspberry Pi (not cross-compiling), CMake couldn't find and link a lot of common libraries.

Since Raspbian is essentially just another Linux distro and probably shouldn't be an entirely different platform,
the easiest fix seems to be to add
/usr/lib/arm-linux-gnueabihf
to
CMAKE_SYSTEM_LIBRARY_PATH
CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
in Modules/Platform/UnixPaths.cmake
Steps To ReproduceI think I originally triggered this by trying to FIND_PACKAGE(OpenAL) on Raspbian.

TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038947)
Brad King (manager)
2015-06-18 09:25

This looks like a variant of the Debian multi-arch directory layout. CMake already knows how to search <prefix>/lib/<arch> if it can detect the <arch> part. CMake looks for such directories among the implicit linker search directories detected from the compiler.

Look for settings and use of CMAKE_LIBRARY_ARCHITECTURE_REGEX in the Modules directory. It could probably be updated to detect this architecture too.
(0038953)
Eric Wing (reporter)
2015-06-18 22:35

You know, I think you can close this bug.

I checked CMake's CMAKE_LIBRARY_ARCHITECTURE_REGEX, and it is already correct.

Something strange happened since yesterday and my Pi just started working correctly. My current theory is that rebooting magically made things start working. (I was on a brand new, fresh install yesterday and had not even rebooted yet.)

Sorry for the noise.
(0040073)
Robert Maynard (manager)
2016-01-04 11:51

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-06-18 09:04 Eric Wing New Issue
2015-06-18 09:25 Brad King Note Added: 0038947
2015-06-18 22:35 Eric Wing Note Added: 0038953
2015-06-19 08:31 Brad King Status new => resolved
2015-06-19 08:31 Brad King Resolution open => no change required
2016-01-04 11:51 Robert Maynard Note Added: 0040073
2016-01-04 11:51 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team