help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: have headers & libs, but cannot configure/make


From: Mike Miller
Subject: Re: have headers & libs, but cannot configure/make
Date: Thu, 5 Jan 2017 11:37:57 -0800
User-agent: NeoMutt/20161126 (1.7.1)

On Tue, Jan 03, 2017 at 17:42:46 -0800, Chris Roat wrote:
> <elided>/gcc -std=gnu11 -o conftest --sysroot=<elided> -m64  -mcld -fopenmp
>  -fopenmp -I<elided>/pcre -I<elided>/SuiteSparse_config --sysroot=<elided>
> -m64  -mcld -fopenmp -lstdc++ conftest.c -lpcre -lm
> 
> <elided>: error: cannot find -lpcre
> /tmp/cc0c03Xl.o:conftest.c:function main: error: undefined reference to
> 'pcre_compile'
> collect2: error: ld returned 1 exit status
> configure:30566: $? = 1

Ok, so it's only missing the appropriate -L option here. Octave's
configure currently does not have a PCRE_LDFLAGS variable, and it
probably should.

> The build system really pushes toward shared-lib linking, so I really felt
> I needed to hardcode values in configure and delete part of the PCRE stanza.

Yes, it is inclined towards shared libraries, and towards certain
libraries being part of the base system, such as BLAS, PCRE, and
readline. But we are open to improvements.

> I
> discovered I needed this change to configure to pick up the CXSPARSE flags
> I passed in via the --with-cxsparse flags:
> 
> 43485,43486c43486,43487
> <     CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
> <     CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
> ---
> >     CPPFLAGS="$CXSPARSE_CPPFLAGS $QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
> >     CXXFLAGS="$CXSPARSE_CXXFLAGS $CXXPICFLAG $CXXFLAGS"

This looks like a legit bug in our configure script (although there is
no CXSPARSE_CXXFLAGS variable).

> And I found I just needed to add two libraries on the final link step of
> the octave-cli.  See my LDFLAGS above.
> - glpk (this didn't get used, even though I had
> --with-glpk="/<path>/libglpk.a"
> - freetype (it needed to be after fontconfig, which I suppose means I can
> add it to FONTCONFIG_LIBS)

And it normally is added, FONTCONFIG_LIBS="-lfontconfig -lfreetype" in a
typical (shared library) build. Maybe a bug that it is not appended in
your case.

In summary, I think we can work through all of these problems if you are
willing to help. Are you interested in helping to improve Octave's
configure so that you can build statically without any of these
workarounds?

I have a particular interest in the build system, so I am motivated to
help, but I would need someone such as yourself who has all the static
library dependencies ready to test against, and is willing to iterate
and build from Octave's hg repository.

Otherwise, I can work on improving PCRE and the CXSPARSE_CPPFLAGS you
have shown, but I have no way to test your use case thoroughly.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]