Peculiar configure behaviour with cleanbuild

David Llewellyn-Jones david at flypig.co.uk
Sun Oct 9 08:00:19 UTC 2016


On 09/10/16 08:34, Loïc Minier wrote:
> From parts/functy/build/config.log:
> configure:4733: checking for glutInit in -lglut
> configure:4758: g++ -o conftest
>  -I/home/ubuntu/functy/parts/functy/install/usr/include
> -I/home/ubuntu/functy/stage/include
>  -I/home/ubuntu/functy/parts/functy/install/usr/include
> -I/home/ubuntu/functy/stage/include
>  -L/home/ubuntu/functy/parts/functy/install/lib
> -L/home/ubuntu/functy/parts/functy/install/usr/lib
> -L/home/ubuntu/functy/parts/functy/install/lib/x86_64-linux-gnu
> -L/home/ubuntu/functy/parts/functy/install/usr/lib/x86_64-linux-gnu
> -L/home/ubuntu/functy/stage/lib -L/home/ubuntu/functy/stage/usr/lib
> -L/home/ubuntu/functy/stage/lib/x86_64-linux-gnu
> -L/home/ubuntu/functy/stage/usr/lib/x86_64-linux-gnu conftest.cpp -lglut
>   >&5
> ./configure: line 1588: g++: command not found
> 
> After adding g++ to build-packages, configure works for me and build
> completes fine  :-)

Thank you so much, Loïc; you're amazing. That's fixed it, and I learnt a
valuable lesson too (the lesson being: check build/config.log).

Thanks again,

David

> On Sat, Oct 8, 2016 at 9:58 PM, David Llewellyn-Jones
> <david at flypig.co.uk <mailto:david at flypig.co.uk>> wrote:
> 
>     Hi all,
> 
>     I'm new to snaps and snapcraft, but have been enjoying learning about
>     it. Things seemed to be going well until I tried to build using
>     cleanbuild.
> 
>     The test in configure for glut is failing, even though as far as I can
>     tell glut is correctly installed. Here's the check I'm using in
>     configure.ac <http://configure.ac>
> 
>     AC_CHECK_LIB([glut], [glutInit], [], [AC_MSG_ERROR([The glut library is
>     missing.])])
> 
>     and here's the tail end of output from running snapcraft -d cleanbuild
> 
>     ...
>     checking for OPENVDB... yes
>     checking for glutInit in -lglut... no
>     configure: error: The glut library is missing.
> 
>     Initially I just assumed glut wasn't installing correctly, so I built
>     the following file inside the container using `gcc test.c -lglut`
> 
>     char glutInit ();
>     int main () {
>             return glutInit ();
>     }
> 
>     This worked fine, so I'm really confused as to what the problem might
>     be. If anyone has any ideas, it'd be a great help.
> 
>     Here are the complete files I'm using:
> 
>     configure.ac <http://configure.ac>
>     https://gitlab.com/flypig/functy/blob/master/configure.ac
>     <https://gitlab.com/flypig/functy/blob/master/configure.ac>
> 
>     snapcraft.yaml
>     https://gitlab.com/flypig/functy/blob/master/linux/snap/snapcraft.yaml
>     <https://gitlab.com/flypig/functy/blob/master/linux/snap/snapcraft.yaml>

-- 
Website: http://www.flypig.co.uk




More information about the Snapcraft mailing list