[Piglit] [PATCH 05/12] cmake: cleanup PIGLIT_USE_WAFFLE builds
Jose Fonseca
jfonseca at vmware.com
Mon Aug 18 08:01:24 PDT 2014
On 18/08/14 15:51, Emil Velikov wrote:
> On 18/08/14 15:22, Jose Fonseca wrote:
>> On 12/08/14 18:18, Emil Velikov wrote:
>> [...]
>>> - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes.
>> [...]
>>
>> Emil,
>>
>> This particular change is causing the build to fail when libwaffle-1.so is not
>> on a standard library directory (ie., outside /usr/lib or /usr/local/lib).
>> This happened to me as my build machines don't install waffle on system
>> directories.
>>
>> I'm not sure what was the driver for replacing WAFFLE_LIBRARIES with
>> WAFFLE_LDFLAGS, but I believe we should undo it.
>>
> The driver behind the change is (if I understand the cmake manual) that one
> should not use the *_LDFLAGS variables, but only INCLUDE_DIRS and LIBRARIES.
It's possible.
cmake's documentation for FindPkgConfig says:
<XPREFIX>_FOUND ... set to 1 if module(s) exist
<XPREFIX>_LIBRARIES ... only the libraries (w/o
the '-l')
<XPREFIX>_LIBRARY_DIRS ... the paths of the
libraries (w/o the '-L')
<XPREFIX>_LDFLAGS ... all required linker flags
<XPREFIX>_LDFLAGS_OTHER ... all other linker flags
<XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor
flags (w/o the '-I')
<XPREFIX>_CFLAGS ... all required cflags
<XPREFIX>_CFLAGS_OTHER ... the other compiler flags
But it's not clear whether the *_LIBRARIES is supposed to have absolute
paths, or just the names. If just the names, then *_LIBRARIES alone
can't work: one will also need to use *_LIBRARY_DIRS , or *_LDFLAGS...
> I suspect that there is a bug with waffle-1.pc can you attach/inline it ?
$ cat
~/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/lib/x86_64-linux-gnu/pkgconfig/waffle-1.pc
prefix=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish
exec_prefix=${prefix}
libdir=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/lib/x86_64-linux-gnu
includedir=/var/lib/hudson/jobs/waffle-ubuntu64/lastSuccessful/archive/publish/include
Name: waffle-1
Description: a library for selecting an OpenGL API and window system at
runtime
Version: 1.3.90
Libs: -L${libdir} -lwaffle-1
Cflags: -I${includedir}/waffle-1
>
> Whereas for a quick fix I would recommend adding back WAFFLE_LDFLAGS in
> set(UTIL_GL_LIBS....
Yes, it fixes the build for now. And we can always revert once again
after figuring out what's the correct way to do it.
Jose
More information about the Piglit
mailing list