lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Cross-compiling lmi from Linux to MSW


From: Greg Chicares
Subject: Re: [lmi] Cross-compiling lmi from Linux to MSW
Date: Fri, 22 Jan 2016 04:26:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2016-01-21 19:37, Greg Chicares wrote:| Looking in 'configure', I see:
|    1477   --with-boost=DIR        prefix of Boost [guess]
| and then around line 15670 I get a vague impression that maybe
| the script expects
|   path/to/include/boost/some_boost_file.hpp
| where I have
|   path/to/include/some_boost_file.hpp
| Is that worth trying after my lunch break?

On 2016-01-21 22:30, Vadim Zeitlin wrote:
> On Thu, 21 Jan 2016 22:12:25 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> ls ~/msw/i686-w64-mingw32/include/version.hpp
> GC> /home/greg/msw/i686-w64-mingw32/include/version.hpp
> 
>  Something must have gone wrongly here, the file should be called
> /home/greg/msw/i686-w64-mingw32/include/boost/version.hpp -- did I mistype
> my file copy command too somehow? In any case, the Boost headers definitely
> must be found under the "boost" subdirectory, could you please move them
> there? Once you do this, I'm pretty confident the original configure
> command should work.

That worked. Now everything builds except lmi itself, due to another
boost problem apparently...but [spoiler alert] I've fixed it...which
[no spoiler] lets me advance to the next level, where I'm stymied.

I did this:

cd ~/src
svn checkout http://svn.sv.nongnu.org/svn/lmi/lmi/trunk lmi
cd ~/src/lmi
./autogen.sh

...and then copied the commands you wrote here:
  http://lists.nongnu.org/archive/html/lmi/2016-01/msg00006.html
viz.:

mkdir ~/build/lmi-msw
cd $_
PATH=$HOME/msw/i686-w64-mingw32/bin:$PATH ~/src/lmi/configure \
  --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
  CPPFLAGS=-I$HOME/msw/i686-w64-mingw32/include \
  LDFLAGS=-L$HOME/msw/i686-w64-mingw32/lib \
  CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable'

(Let me note parenthetically that this pair of lines:
  checking dynamic linker characteristics... Win32 ld.exe
  checking how to hardcode library paths into programs... immediate
occurs twice, with a few other lines between--perhaps something
is duplicated in the script?)

This produces an error message:

configure: error: Boost filesystem library boost_filesystem not found, use 
--with-boost-libs=dir
if it is installed in non default location

We used this for xmlwrapp:
      --with-boost=$HOME/msw/i686-w64-mingw32 \
but it doesn't look like it'll work here because './configure --help'
says [reformatted slightly]:
  --with-boost-headers=dir Boost headers directory
  --with-boost-libs=dir    Boost libs installation directory
  --with-boost-toolkit=dir Boost installation toolkit (gcc, mgw, etc.)

...so I tried adding
  --with-boost-libs=dir=$HOME/src/3rdparty/boost_1_38_0 \
  configure: error: Boost filesystem library boost_filesystem not found, even 
in dir=/home/greg/src/3rdparty/boost_1_38_0
and
  --with-boost-libs=dir=$HOME/src/3rdparty/boost_1_38_0/libs \
  configure: error: Boost filesystem library boost_filesystem not found, even 
in dir=/home/greg/src/3rdparty/boost_1_38_0/libs
but no joy.

Then I looked back at the command used to build boost libraries:
  for d in regex system filesystem; \
    (cd libs/$d/src && \
    i686-w64-mingw32-g++ -I../../.. -c *.cpp && \
    i686-w64-mingw32-ar rc ~/msw/i686-w64-mingw32/libboost_$d.a *.o)
                           ^^^^^^^^^^^^^^^^^^^^^^^
which led me to try:

PATH=$HOME/msw/i686-w64-mingw32/bin:$PATH ~/src/lmi/configure \
  --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
  --with-boost-libs=dir=$HOME/msw/i686-w64-mingw32/ \
  CPPFLAGS=-I$HOME/msw/i686-w64-mingw32/include \
  LDFLAGS=-L$HOME/msw/i686-w64-mingw32/lib \
  CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable' 2>&1 |less
configure: error: Boost filesystem library boost_filesystem not found, even in 
dir=/home/greg/msw/i686-w64-mingw32/

Yet they *are* there:
  ls /home/greg/msw/i686-w64-mingw32/
  bin    lib                    libboost_regex.a   man    src
  include  libboost_filesystem.a        libboost_system.a  share

...so the error is impossible and, as a last resort, I re-read my
command and saw the obvious
  --with-boost-libs=dir=$HOME/msw/i686-w64-mingw32/ \
                    ^^^^
which validates the old usenet truism that if you write a problem
report with meticulous rigor, half the time you won't have to send it.

But now I try
  $make --jobs=16
and get:
  cc1plus: error: unrecognized command line option "-Wno-unused-local-typedefs" 
[-Werror]

Huh? I copied and pasted that into a search engine, then searched
case-sensitively for the same (pasted) string, and...it certainly
does seem to be a valid gcc option. What am I missing?

Anyway, to isolate the errors, I did
  $make --keep-going --jobs=16
to compile everything I could, and then
  $make --keep-going
to show the errors remaining, which follow. I'm not too worried about:
  variable 'i' set but not used
but this one confuses me:
  i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
Here's how I installed the cross toolchain:
  apt-get install g++-mingw-w64-i686
and let's see whether it's even remotely sane:
  i686-w64-mingw32-gcc -dumpversion
  4.6
Okay, this is debian-7, so it's an older gcc, and maybe I should
get 4.9.1 from debian-8 instead; but '--enable-auto-import' worked
with gcc-3.x, so I don't see how it can be unrecognized.

make  all-am
make[1]: Entering directory `/home/greg/build/lmi-msw'
  CXX    libskeleton_la-group_quote_pdf_gen_wx.lo
In file included from 
/home/greg/msw/i686-w64-mingw32/include/wx/pdfdocument.h:25:0,
                 from /home/greg/msw/i686-w64-mingw32/include/wx/pdfdc.h:21,
                 from /home/greg/src/lmi/group_quote_pdf_gen_wx.cpp:57:
/home/greg/msw/i686-w64-mingw32/include/wx/pdfarraytypes.h:27:86: error: 
invoking macro WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY argument 4: empty macro 
arguments are undefined in ISO C90 and ISO C++98
cc1plus: error: unrecognized command line option "-Wno-unused-local-typedefs" 
[-Werror]
cc1plus: all warnings being treated as errors
make[1]: *** [libskeleton_la-group_quote_pdf_gen_wx.lo] Error 1
  CXX    libskeleton_la-skeleton.lo
/home/greg/src/lmi/skeleton.cpp: In function 'std::string 
{anonymous}::redelimit_with_semicolons(const string&)':
/home/greg/src/lmi/skeleton.cpp:889:37: error: variable 'i' set but not used 
[-Werror=unused-but-set-variable]
At global scope:
cc1plus: error: unrecognized command line option "-Wno-unused-local-typedefs" 
[-Werror]
cc1plus: all warnings being treated as errors
make[1]: *** [libskeleton_la-skeleton.lo] Error 1
  CXXLD  lmi_cli.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [lmi_cli.exe] Error 1
  CXXLD  elapsed_time.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [elapsed_time.exe] Error 1
  CXXLD  generate_passkey.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [generate_passkey.exe] Error 1
  CXXLD  antediluvian_cli.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [antediluvian_cli.exe] Error 1
  CXXLD  ihs_crc_comp.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [ihs_crc_comp.exe] Error 1
  CXXLD  product_files.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [product_files.exe] Error 1
  CXXLD  test_coding_rules.exe
i686-w64-mingw32-g++: error: unrecognized option '--enable-auto-import'
make[1]: *** [test_coding_rules.exe] Error 1
make[1]: Target `all-am' not remade because of errors.
make[1]: Leaving directory `/home/greg/build/lmi-msw'
make: *** [all] Error 2
/home/greg/build/lmi-msw[2]$

And here are some warnings that were inadvertently filtered:

  CXXLD  liblmi.la

*** Warning: This system can not link to static lib archive /home/greg/msw/i686-
w64-mingw32/lib/libxsltwrapp.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

Similarly: libexslt.la, libxslt.la, libxmlwrapp.la

*** Warning: linker path does not have real file for library -lboost_regex.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libboost_regex but no candidates were found. (...for file magic test)

Similarly: -lboost_filesystem, -lboost_system

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.




reply via email to

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