bugPSPP - Bugs: bug #59673, cross compilation is not possible

 
 

bug #59673: cross compilation is not possible

Submitter:  Harry Thijssen <unknown_one>
Submitted:  Sun 13 Dec 2020 04:53:06 PM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 16 Dec 2020 01:23:12 PM UTC, comment #11: 

You can't go copying a source tree configured for one architecture into a tree configured for another architecture.  That is bound to cause problems.

If you configure and build entirely out-of-source then I think this problem will not arise.

John Darrington <jmd>
Group administrator
Wed 16 Dec 2020 01:09:40 PM UTC, comment #10: 

I am trying now the path of building pspp native on openSUSE with
--without-gui --without-cairo

That would give me the ability to copy pspp in the correct directory when cross-building

Unfortunately I now get the error:

/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I./gl -I./gl -DINSTALLDIR=\"/usr/local/bin\" -I./src -I./lib -Isrc -I./src/language/stats -I./src/language/expressions -I./src/language/expressions    -g -O2 -DGCC_LINT -MT src/ui/terminal/libui_la-main.lo -MD -MP -MF src/ui/terminal/.deps/libui_la-main.Tpo -c -o src/ui/terminal/libui_la-main.lo `test -f 'src/ui/terminal/main.c' || echo './'`src/ui/terminal/main.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./gl -I./gl -DINSTALLDIR=\"/usr/local/bin\" -I./src -I./lib -Isrc -I./src/language/stats -I./src/language/expressions -I./src/language/expressions -g -O2 -DGCC_LINT -MT src/ui/terminal/libui_la-main.lo -MD -MP -MF src/ui/terminal/.deps/libui_la-main.Tpo -c src/ui/terminal/main.c  -fPIC -DPIC -o src/ui/terminal/.libs/libui_la-main.o
In file included from ./gl/getopt.h:84:0,
                 from ./src/libpspp/argv-parser.h:38,
                 from src/ui/terminal/main.c:43:
./gl/getopt-cdefs.h:32:5: error: #if with no expression
 #if

Harry Thijssen <unknown_one>
Tue 15 Dec 2020 03:04:33 PM UTC, comment #9: 

I guess you must be building in-source.

On Makefile line 14306, can you try changing top_srcdir to abs_top_srcdir

John Darrington <jmd>
Group administrator
Tue 15 Dec 2020 02:27:03 PM UTC, comment #8: 

Hi thanks

I get:

Making all in po
make[2]: Entering directory '/home/pspp/pspp-master-20201215/pspp-1.5.2-g60aae3/po'
make[2]: Leaving directory '/home/pspp/pspp-master-20201215/pspp-1.5.2-g60aae3/po'
make[2]: Entering directory '/home/pspp/pspp-master-20201215/pspp-1.5.2-g60aae3'
/usr/bin/mkdir -p native
(cd native && ./configure --without-gui)
/bin/sh: ./configure: No such file or directory
make[2]: * [Makefile:14306: native/Makefile] Error 127
make[2]: Leaving directory '/home/pspp/pspp-master-20201215/pspp-1.5.2-g60aae3'

The directory native is empty.

Harry Thijssen <unknown_one>
Mon 14 Dec 2020 06:11:33 PM UTC, comment #7: 

I pushed a fix which addresses this by having a cross build also perform a native build.

Some fine tuning might be necessary.

John Darrington <jmd>
Group administrator
Mon 14 Dec 2020 05:42:57 AM UTC, comment #6: 

We're doing more complicated stuff here than envisioned in Automake, so it makes sense that we'd end up replacing its rules.

Ben Pfaff <blp>
Group administrator
Mon 14 Dec 2020 05:40:06 AM UTC, comment #5: 

I think we need hand crafted build rules anyway because the build dependencies are not correct resulting in build failure for the homebrew nightly as discussed here:

https://savannah.gnu.org/bugs/?59577

Friedrich Beckmann <beckmanf>
Group Member
Mon 14 Dec 2020 04:41:03 AM UTC, comment #4: 

It makes sense that Automake doesn't support conditional Texinfo, because Automake wants to include the Info for Texinfo in a distribution tarball and that doesn't make sense if it's conditional.

We could do it as a hierarchical build, or we could give up on the Automake support for Texinfo and write our own build rules.

Ben Pfaff <blp>
Group administrator
Mon 14 Dec 2020 04:36:20 AM UTC, comment #3: 

We discussed this already and the idea was to add a configure option to not build the documentation during cross build. The win32 cross build does not build the documenation anyway but takes it from Bens nightly. See:

https://lists.gnu.org/archive/html/pspp-dev/2020-11/msg00020.html

I figured out that automake does not allow to have


info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi


conditional. The usual way seems to be that the documentation is build as a hierarchical build.


Friedrich Beckmann <beckmanf>
Group Member
Sun 13 Dec 2020 07:36:04 PM UTC, comment #2: 

I tend toward something close to #2, in which PSPP disables building the manual if cross-compiling.  For a cross-compile, the builder would build twice: once natively, and run "make install-docs", and once cross, and run "make install" (which would omit the manual).

I still don't understand why for the w32 case one doesn't use wine to run the cross builds.  It works OK for me, and then there's no changes needed.

Ben Pfaff <blp>
Group administrator
Sun 13 Dec 2020 05:07:12 PM UTC, comment #1: 

Yes, we need to make a decision about this.   As I see it, the options are:

1.  Accept and document that cross-compilation is not possible (will upset people who build for w32).
2.  Arrange that before  cross compiling, pspp is first built natively (this will require the user to install a native set of dependencies as well has the hosts dependencies)
3.  Ship the built artifacts in the tarball (this risks them becoming out of date and us not noticiing).
4. ?

John Darrington <jmd>
Group administrator
Sun 13 Dec 2020 04:53:06 PM UTC, original submission:  

to include this issue in the lists:

I still get this error:

libtool: link: ( cd "src/.libs" && rm -f "libpspp-core.la" && ln -s "../libpspp-core.la" "libpspp-core.la" )
/bin/sh ./libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc -Wall -Wextra -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes -ggdb   `: /usr/i686-w64-mingw32/sys-root/mingw/bin` -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -Wl,--no-keep-memory -o src/ui/terminal/pspp.exe  src/ui/terminal/libui.la src/ui/libuicommon.la src/libpspp.la src/libpspp-core.la -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo  -lreadline -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgsl -lgslcblas -lm -liconv -lreadline -lgslcblas -lz -lintl
libtool: link: i686-w64-mingw32-gcc -Wall -Wextra -Wwrite-strings -Wstrict-prototypes -Wpointer-arith -Wno-sign-compare -Wmissing-prototypes -ggdb -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -Wl,--no-keep-memory -o src/ui/terminal/.libs/pspp.exe  src/ui/terminal/.libs/libui.a src/ui/.libs/libuicommon.a src/.libs/libpspp.a -L/usr/i686-w64-mingw32/sys-root/mingw/lib src/.libs/libpspp-core.a -lxml2 -lpq -ladvapi32 -lws2_32 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lgsl /usr/i686-w64-mingw32/sys-root/mingw/lib/libiconv.dll.a -lreadline -lgslcblas -lz -lintl -L/usr/i686-w64-mingw32/sys-root/mingw/lib
(cd ./examples \
         && /home/harry/pspp-master-20201205/pspp-1.5.2-ga06dd5/src/ui/terminal/pspp ../doc/pspp-figures/aggregate.sps -o - -O format=spv) > doc/pspp-figures/aggregate.spv.tmp
/bin/sh: line 1: /home/harry/pspp-master-20201205/pspp-1.5.2-ga06dd5/src/ui/terminal/pspp: No such file or directory
make[2]: * [Makefile:14303: doc/pspp-figures/aggregate.spv] Error 127
make[2]: Leaving directory '/home/harry/pspp-master-20201205/pspp-1.5.2-ga06dd5'

The reason is here:

https://lists.gnu.org/archive/html/pspp-dev/2020-11/msg00011.html


Harry Thijssen <unknown_one>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by beckmanf (Posted a comment)
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by unknown_one (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-14 jmd StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code