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: Fri, 23 Dec 2016 16:22:56 -0800
User-agent: NeoMutt/20161126 (1.7.1)

On Fri, Dec 23, 2016 at 15:49:42 -0800, Chris Roat wrote:
> I am cross compiling and defining CC/CPP/CXX/etc, using static libraries.
> 
> First problem: I have the pcre headers & libs present, and use -I in
> CCFLAGS/CPPFLAGS and -L in LDFLAGS to point to them.  Configure still gives
> up the ghost.  (My workaround is to simply delete part of the PCRE section
> in 'configure' and hardcode the PCRE_LIBS.)

It would be interesting to see what the error here was. If you can
recreate this, can you paste the full compiler command line and error
message from config.log? It should be enough to search for "checking for
pcre_compile".

> 
> includes="-I${include_path}/pcre "
> libs="-L${lib_path}/prce"
> export CCFLAGS="--sysroot=$rt_top --m64 -mcld ${includes}"

This should be "CFLAGS", not "CCFLAGS". And you might also want to set
CXXFLAGS and FFLAGS.

> export CPPFLAGS="--sysroot=$rt_top -m64 -mcld ${includes}"

The CPPFLAGS variable should contain preprocessor options, so typically
only -D and -I options. And these options are cumulative with the other
CFLAGS/CXXFLAGS/FFLAGS.

> export LDFLAGS="--sysroot=$rt_top -m64 -mcld -lstdc++ -fopenmp ${libs}"

The -fopenmp option should be given at both the compile and link stages.
And I'm not sure that you need to force -lstdc++, even with cross
compiling. The build system ensures that anything linked with a C++
object file will use g++ as the linker, which DTRT.

I would recommend something like this

  options="--sysroot=$rt_top -m64 -mcld -fopenmp"
  export CPPFLAGS="${includes}"
  export CFLAGS="${options}"
  export CXXFLAGS="${options}"
  export FFLAGS="${options}"
  export LDFLAGS="${options} ${libs}"

> Secondly, once I get configure to work by passing in all the include
> directories and libraries (using lots and lots of --with-xxx flags), I
> still seem need to the libraries all again in LDFLAGS.    For example, the
> octave-cli target is made without referencing any library I passed into
> configure's flags.
> 
> I feel like I missed some basic instruction, flag, or other step.  Thanks
> in advance for any tips.
> 
> ./configure \
>   --enable-option-checking \
>   --disable-silent-rules \
>   --disable-dl \
>   --disable-shared \
>   --enable-static \
>   --disable-readline \
>   --disable-docs \
>   --disable-java \
>   --without-qt \
>   --without-fltk \
>   --without-opengl \
>   --without-OSMesa \
>   --without-portaudio \
>   --without-sndfile \
>   --without-x \
>   --with-blas=...(lots more of these)

Most users do not build Octave statically, so you may be testing a
configuration that hasn't been used in a while. But there is a configure
option, --enable-link-all-dependencies, which I think is intended for
this purpose. Try it and let us know if it helps.

Also, which version (or hg revision) are you trying to build?

-- 
mike



reply via email to

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