(removed the logfile, as it's way bigger than the 900KB limit.)

--- original message ---
From: " " <cedric.dew...@eclipso.eu>
Date: 14.08.2024 23:46:27
To: "sigrok-devel" <sigrok-devel@lists.sourceforge.net>
Subject: Re: [sigrok-devel] crosscompile using mingw failes on arch linux

I'm now following the procedure in this comment:
https://github.com/sigrokproject/libsigrok/pull/131#issuecomment-866261903


it gives me a different error, way later in the process:
../../gcc-5.5.0/gcc/recog.h: In member function ‘rtx_def* 
insn_gen_fn::operator()(rtx,
rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx)
const’:
../../gcc-5.5.0/gcc/recog.h:317:170: warning: cast between incompatible function
types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to 
‘insn_gen_fn::f16’
{aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*, rtx_def*)’} [-Wcast-function-type]
  317 |   rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5,
rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14,
rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8,
a9, a10, a11, a12, a13, a14, a15); }
      |
                               ^~~~~~~~~
../../gcc-5.5.0/gcc/reload1.c: In function ‘void init_reload()’:
../../gcc-5.5.0/gcc/reload1.c:115:24: error: use of an operand of type ‘bool’
in ‘operator++’ is forbidden in C++17
  115 |   (this_target_reload->x_spill_indirect_levels)
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-5.5.0/gcc/reload1.c:470:7: note: in expansion of macro 
‘spill_indirect_levels’

  470 |       spill_indirect_levels++;
      |       ^~~~~~~~~~~~~~~~~~~~~

Here's how I got there:

$ cd ~
$ git clone git://sigrok.org/sigrok-util
$ git clone https://github.com/mxe/mxe.git mxe-git
$ cd mxe-git
$ git checkout build-2020-06-06
$ patch -p1 < ../sigrok-util/cross-compile/mingw/mxe_fixes.patch
patching file src/binutils-1-fixes.patch
patching file src/binutils.mk
patching file src/glib-1-fixes.patch
patching file src/glib-2-format.patch
patching file src/glib.mk
$ make MXE_TARGETS=x86_64-w64-mingw32.static.posix 
MXE_PLUGIN_DIRS=plugins/examples/qt5-freeze
gcc glib libzip libusb1 libftdi1 hidapi glibmm qtbase qtimageformats qtsvg
qttranslations boost check gendef libieee1284 
qtbase_CONFIGURE_OPTS='-no-sql-mysql'


create settings.mk]
[check reqs]
[download]    binutils-2.35.tar.bz2
[nonet lib]   /home/cedric/mxe-git/usr/x86_64-pc-linux-gnu/lib/nonetwork.so
                                                            
[git-log]   f5fe0a81 wget: fix shared build
[build]       mxe-conf                  x86_64-w64-mingw32.static.posix
[done]        mxe-conf                  x86_64-w64-mingw32.static.posix
             0 KiB          0m1.772s
[download]    ccache-3.6.tar.xz
[build]       mxe-conf                  x86_64-pc-linux-gnu
[done]        mxe-conf                  x86_64-pc-linux-gnu
            0 KiB          0m1.760s
[build]       ccache                    x86_64-pc-linux-gnu
[done]        ccache                    x86_64-pc-linux-gnu
            4468 KiB       0m4.442s
[build]       ccache                    x86_64-w64-mingw32.static.posix
[done]        ccache                    x86_64-w64-mingw32.static.posix
             2220 KiB       0m1.781s
[build]       binutils                  x86_64-w64-mingw32.static.posix
[done]        binutils                  x86_64-w64-mingw32.static.posix
             532148 KiB     0m40.412s
[download]    mingw-w64-v7.0.0.tar.bz2
[build]       mingw-w64                 x86_64-w64-mingw32.static.posix
[done]        mingw-w64                 x86_64-w64-mingw32.static.posix
             0 KiB          0m1.769s
[download]    gmp-6.1.2.tar.xz
[build]       gmp                       x86_64-pc-linux-gnu
[done]        gmp                       x86_64-pc-linux-gnu
            29116 KiB      0m19.703s
[download]    isl-0.15.tar.bz2
MXE Warning! Downloading isl from second URL.
[build]       isl                       x86_64-pc-linux-gnu
[done]        isl                       x86_64-pc-linux-gnu
            41248 KiB      0m12.600s
[download]    mpfr-4.0.2.tar.xz
[build]       mpfr                      x86_64-pc-linux-gnu
[done]        mpfr                      x86_64-pc-linux-gnu
            19092 KiB      0m12.821s
[download]    mpc-1.1.0.tar.gz
[build]       mpc                       x86_64-pc-linux-gnu
[done]        mpc                       x86_64-pc-linux-gnu
            6448 KiB       0m5.630s
[download]    gcc-5.5.0.tar.xz
[build]       gcc                       x86_64-w64-mingw32.static.posix

Failed to build package gcc for target x86_64-w64-mingw32.static.posix!

------------------------------------------------------------
rm gcc.pod gfortran.pod
make[3]: Leaving directory 
'/home/cedric/mxe-git/tmp-gcc-x86_64-w64-mingw32.static.posix/gcc-5.5.0.build_/gcc'

make[2]: *** [Makefile:4118: all-gcc] Error 2
make[2]: Leaving directory 
'/home/cedric/mxe-git/tmp-gcc-x86_64-w64-mingw32.static.posix/gcc-5.5.0.build_'

make[1]: *** [Makefile:846: build-only-gcc_x86_64-w64-mingw32.static.posix]
Error 2
make[1]: Leaving directory '/home/cedric/mxe-git'
real    1m42.431s
user    7m16.052s
sys     0m44.618s
------------------------------------------------------------
[log]      /home/cedric/mxe-git/log/gcc_x86_64-w64-mingw32.static.posix 
(attached)


make: *** [Makefile:834: 
/home/cedric/mxe-git/usr/x86_64-w64-mingw32.static.posix/installed/gcc]
Error 1





--- original message ---
From: via sigrok-devel <sigrok-devel@lists.sourceforge.net>
Date: 14.08.2024 23:14:14
To: "sigrok-devel" <sigrok-devel@lists.sourceforge.net>
Subject: [sigrok-devel] crosscompile using mingw failes on arch linux

­I'm trying to cross compile Sigrok using this guide [1]


It gives warnings at the patch step, and then fails during compilation of

mxe:

$ cd git-werkmap/
$ git clone git://sigrok.org/sigrok-util
$ cd sigrok-util/cross-compile/mingw/
$ cd
$ git clone https://github.com/mxe/mxe.git mxe-git
$ cd mxe-git
$ patch -p1 < ~/git-werkmap/sigrok-util/cross-compile/mingw/mxe_fixes.patch


patching file src/binutils-1-fixes.patch
Reversed (or previously applied) patch detected!  Assume -R? [n] n
        
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/binutils-1-fixes.patch.rej


patching file src/binutils.mk
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file src/binutils.mk.rej
patching file src/glib-1-fixes.patch
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 29.
Hunk #3 FAILED at 56.
Hunk #4 FAILED at 69.
Hunk #5 FAILED at 86.
Hunk #6 FAILED at 131.
Hunk #7 FAILED at 139.
Hunk #8 FAILED at 152.
Hunk #9 FAILED at 171.
Hunk #10 FAILED at 195.
Hunk #11 FAILED at 535.
Hunk #12 FAILED at 548.
Hunk #13 FAILED at 556.
Hunk #14 FAILED at 564.
Hunk #15 FAILED at 576.
Hunk #16 FAILED at 596.
16 out of 16 hunks FAILED -- saving rejects to file src/glib-1-fixes.patch.rej


patching file src/glib-2-format.patch
patching file src/glib.mk
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 27.
Hunk #3 FAILED at 55.
Hunk #4 FAILED at 97.
4 out of 4 hunks FAILED -- saving rejects to file src/glib.mk.rej

$ patch -p1 < 
~/git-werkmap/sigrok-util/cross-compile/mingw/libusb1_upgrade.patch


patching file src/libusb1.mk
patching file src/libusb1-1-fixes.patch

$ make MXE_TARGETS=i686-w64-mingw32.static.posix 
MXE_PLUGIN_DIRS=plugins/examples/qt5-freeze

gcc glib libzip libusb1 libftdi1 hidapi glibmm qtbase qtimageformats qtsvg

qttranslations boost check gendef libieee1284 
qtbase_CONFIGURE_OPTS='-no-sql-mysql'


[check reqs]
[download]    binutils-2.38.tar.bz2
[nonet lib]   /home/cedric/mxe-git/usr/x86_64-pc-linux-gnu/lib/nonetwork.so

                                                                
[git-log]   9f349e0d openssl: github is the new download source
[build]       mxe-conf                 i686-w64-mingw32.static.posix
[done]        mxe-conf                 i686-w64-mingw32.static.posix
               0 KiB          0m2.495s
[download]    ccache-3.6.tar.xz
[build]       mxe-conf                 x86_64-pc-linux-gnu
[done]        mxe-conf                 x86_64-pc-linux-gnu
               0 KiB          0m2.492s
[build]       ccache                   x86_64-pc-linux-gnu
[done]        ccache                   x86_64-pc-linux-gnu
               4468 KiB       0m5.143s
[build]       ccache                   i686-w64-mingw32.static.posix
[done]        ccache                   i686-w64-mingw32.static.posix
               2220 KiB       0m2.493s
[build]       binutils                 i686-w64-mingw32.static.posix
[done]        binutils                 i686-w64-mingw32.static.posix
               542012 KiB     0m42.604s
[download]    mingw-w64-v12.0.0.tar.bz2
[build]       mingw-w64                i686-w64-mingw32.static.posix
[done]        mingw-w64                i686-w64-mingw32.static.posix
               0 KiB          0m2.476s
[download]    gmp-6.3.0.tar.xz
[build]       gmp                      x86_64-pc-linux-gnu
[done]        gmp                      x86_64-pc-linux-gnu
               32160 KiB      0m20.882s
[download]    isl-0.24.tar.bz2
[build]       isl                      x86_64-pc-linux-gnu
[done]        isl                      x86_64-pc-linux-gnu
               70552 KiB      0m15.850s
[download]    mpfr-4.2.1.tar.xz
[build]       mpfr                     x86_64-pc-linux-gnu
[done]        mpfr                     x86_64-pc-linux-gnu
               18772 KiB      0m13.991s
[download]    mpc-1.3.1.tar.gz
[build]       mpc                      x86_64-pc-linux-gnu
[done]        mpc                      x86_64-pc-linux-gnu
               7344 KiB       0m6.642s
[download]    gcc-11.4.0.tar.xz
[build]       gcc                      i686-w64-mingw32.static.posix

Failed to build package gcc for target i686-w64-mingw32.static.posix!
------------------------------------------------------------
config.status: creating config.h
config.status: executing depdir commands
mkdir -p -- .deps
make[2]: Leaving directory 
'/home/cedric/mxe-git/tmp-gcc-i686-w64-mingw32.static.posix/gcc-11.4.0.build_'


make[1]: *** [Makefile:903: build-only-gcc_i686-w64-mingw32.static.posix]

Error 2
make[1]: Leaving directory '/home/cedric/mxe-git'
real    0m26.341s
user    0m52.714s
sys     0m19.820s
------------------------------------------------------------
[log]      /home/cedric/mxe-git/log/gcc_i686-w64-mingw32.static.posix

make: *** [Makefile:891: 
/home/cedric/mxe-git/usr/i686-w64-mingw32.static.posix/installed/gcc]

Error 1

I see the following error in 
/home/cedric/mxe-git/log/gcc_i686-w64-mingw32.static.posix

(attached)

checking whether asprintf is declared... 
../../gcc-11.4.0/libiberty/simple-object-mach-o.c:

In function ‘simple_object_mach_o_write_segment’:
../../gcc-11.4.0/libiberty/simple-object-mach-o.c:1231:17: error: passing

argument 1 of ‘set_32’ from incompatible pointer type 
[-Wincompatible-pointer-types]


 1231 |         set_32 (&index[i], index[i]);
      |                 ^~~~~~~~~
      |                 |
      |                 unsigned int *
../../gcc-11.4.0/libiberty/simple-object-mach-o.c:1231:17: note: expected

‘unsigned char *’ but argument is of type ‘unsigned int *’
make[3]: *** [Makefile:1306: simple-object-mach-o.o] Error 1


[1] 
http://sigrok.org/gitweb/?p=sigrok-util.git;a=blob;f=cross-compile/mingw/README;h=43d05f282c2b721d7e0c0bf2f3d2bfde31e426fb;hb=HEAD


________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail Europe. 
https://www.eclipso.eu



_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel


________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail Europe. 
https://www.eclipso.eu



________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail Europe. 
https://www.eclipso.eu




_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to