Discussion:
[Mingw-cross-env-list] problems compiling qtbase with mxe
hagen wegner
2018-09-07 06:56:47 UTC
Permalink
Hi,

I am having problems building qtbase using mxe on centos 7.

I installed mxe from github, installed the dependencies as per instructions. When I run 'make qtbase' I get:

[create settings.mk]
[check reqs]

and that's it. 'make' is sleeping and nothing is happening.

Any ideas where to look what is going wrong?

Regards,
Hagen
.
Tony Theodore
2018-09-07 08:34:24 UTC
Permalink
Hi Hagen,
Post by hagen wegner
[create settings.mk]
[check reqs]
and that's it. 'make' is sleeping and nothing is happening.
That’s very strange, the next few lines of output should be like:

$ make qtbase
[create settings.mk]
[check reqs]
[nonet lib] /usr/lib/mxe/usr/x86_64-pc-linux-gnu/lib/nonetwork.so
[git-log] 5bd414d Update packages.json & build-matrix.html
[build] mxe-conf i686-w64-mingw32.static
[done] mxe-conf i686-w64-mingw32.static 12 KiB 0m3.497s
[build] binutils i686-w64-mingw32.static

and some [download] messages in between. What’s the output of `ps aux | grep make`?

Cheers,

Tony
hagen wegner
2018-09-07 09:04:23 UTC
Permalink
Hi Tony,

thank you for your fast reply !

the 'ps' output is:

hagen 12885 19.8 0.3 134288 27352 pts/2 S+ 08:51 0:11 make qtbase
hagen 13171 0.0 0.0 112708 972 pts/0 S+ 08:52 0:00 grep --color=auto make

I also ran the 'make' with -d option. Zipped output attached (too big to include here). It seems make wants to run something in the ./usr/installed directory which is empty. I don't know what should be there, that's why I'm stuck. Do I have to do a git checkout after the git clone or have I forgotten some other step?

I also tried editing the 'settings.mk' which had only commented out lines. Did not make any difference. Attached too.

Regards,
Hagen
.
--------------------------------------------
On Fri, 9/7/18, Tony Theodore <***@logyst.com> wrote:

Subject: Re: [Mingw-cross-env-list] problems compiling qtbase with mxe
To: "hagen wegner" <***@yahoo.com>
Cc: mingw-cross-env-***@nongnu.org
Date: Friday, September 7, 2018, 8:34 AM

Hi Hagen,
...When I run
[create settings.mk]
[check reqs]
and
that's it.  'make' is sleeping and nothing is
happening.


That’s very strange, the next few lines of
output should be like:

    $
make qtbase
    [create settings.mk]
    [check reqs]
   
[nonet lib] 
/usr/lib/mxe/usr/x86_64-pc-linux-gnu/lib/nonetwork.so
    [git-log]  5bd414d Update packages.json
& build-matrix.html
    [build]   
  mxe-conf              i686-w64-mingw32.static
    [done]        mxe-conf         
    i686-w64-mingw32.static                   
              12 KiB        0m3.497s
    [build]      binutils         
    i686-w64-mingw32.static

and some [download] messages in between.
What’s the output of `ps aux | grep make`?

Cheers,

Tony
Tony Theodore
2018-09-07 10:18:47 UTC
Permalink
Post by hagen wegner
Hi Tony,
thank you for your fast reply !
hagen 12885 19.8 0.3 134288 27352 pts/2 S+ 08:51 0:11 make qtbase
hagen 13171 0.0 0.0 112708 972 pts/0 S+ 08:52 0:00 grep --color=auto make
I also ran the 'make' with -d option. Zipped output attached (too big to include here). It seems make wants to run something in the ./usr/installed directory which is empty. I don't know what should be there, that's why I'm stuck.
It’s not trying run something from there, that’s just where it puts the install markers. The debug output almost looks like one of the reqs programs is dropping into an interactive mode but that doesn’t make sense. What does:

make check-requirements -d -r -n

output?
Post by hagen wegner
Do I have to do a git checkout after the git clone or have I forgotten some other step?
There’s no other steps, you could probably do:

make -t check-requirements

to skip this step but may have issues down the track. I’ll try to set up a Centos vm and see what happens - do you have the commands you ran to install the requirements?

Cheers,

Tony
Tony Theodore
2018-09-07 10:59:41 UTC
Permalink
Post by Tony Theodore
I’ll try to set up a Centos vm and see what happens - do you have the commands you ran to install the requirements?
I used the `yum` install commands and ended up with:

$ make qtbase
[create settings.mk]
[check reqs]
Missing requirement: 7za

Please have a look at "docs/index.html" to ensure
that your system meets all requirements.

I couldn’t find an easy way to install this (no p7zip pkg in default Centos), but at least it’s giving me an expected error.

Is it possible you have something set up to prompt for a “would you like to install” for missing programs?

Cheers,

Tony
Tony Theodore
2018-09-07 11:55:38 UTC
Permalink
Post by Tony Theodore
I couldn’t find an easy way to install this (no p7zip pkg in default Centos), but at least it’s giving me an expected error.
yum install epel-release
yum install p7zip

Cheers,

Tony
Volker Diels-Grabsch
2018-09-07 14:30:17 UTC
Permalink
Post by Tony Theodore
Post by Tony Theodore
I couldn’t find an easy way to install this (no p7zip pkg in default Centos), but at least it’s giving me an expected error.
yum install epel-release
yum install p7zip
Can we improve the docs to cover this information?

It might make sense to add a hint to the Fedora section,
or to create a new CentOS/RHEL section.


Regards,
Volker
--
Volker Diels-Grabsch
----<<<((()))>>>----
Tony Theodore
2018-09-08 08:59:34 UTC
Permalink
Post by Volker Diels-Grabsch
Post by Tony Theodore
Post by Tony Theodore
I couldn’t find an easy way to install this (no p7zip pkg in default Centos), but at least it’s giving me an expected error.
yum install epel-release
yum install p7zip
Can we improve the docs to cover this information?
It might make sense to add a hint to the Fedora section,
Done. https://github.com/mxe/mxe/commit/b0c7bfb5f3f4650a7e181081c0465cb6fbc5fb0e
Volker Diels-Grabsch
2018-09-08 09:37:31 UTC
Permalink
Post by Tony Theodore
Post by Volker Diels-Grabsch
It might make sense to add a hint to the Fedora section,
Done. https://github.com/mxe/mxe/commit/b0c7bfb5f3f4650a7e181081c0465cb6fbc5fb0e
Great. Thanks!


Regards,
Volker
--
Volker Diels-Grabsch
----<<<((()))>>>----
hagen wegner
2018-09-07 15:25:59 UTC
Permalink
Hi Tony,

I had p7zip installed before, so I don't think that is the problem.

Output make check-requirements attached.

Before attempting to build I had installed the Fedora prerequisites as per instructions on the mxe web site:

yum install \
autoconf \
automake \
bash \
bison \
bzip2 \
flex \
gcc-c++ \
gdk-pixbuf2-devel \
gettext \
git \
gperf \
intltool \
libtool \
make \
openssl-devel \
p7zip \
patch \
perl \
pkgconfig \
python \
ruby \
sed \
unzip \
wget \
xz

I had epel repository installed already before that, so that command worked fine.

I ran the yum again now and got 'package installed and latest version already' for every package.

Regards,
Hagen
.
--------------------------------------------
On Fri, 9/7/18, Tony Theodore <***@logyst.com> wrote:

Subject: Re: [Mingw-cross-env-list] problems compiling qtbase with mxe
To: "hagen wegner" <***@yahoo.com>
Cc: mingw-cross-env-***@nongnu.org
Date: Friday, September 7, 2018, 11:55 AM
I
couldn’t find an easy way to install this (no p7zip pkg in
default Centos), but at least it’s giving me an expected
error.

    yum install
epel-release
    yum install p7zip

Cheers,

Tony
Tony Theodore
2018-09-08 04:02:26 UTC
Permalink
Post by hagen wegner
Hi Tony,
I had p7zip installed before, so I don't think that is the problem.
Output make check-requirements attached.
Looks like it’s getting stuck somewhere around `sed` or `sort`. Does the output of:

which {sed,sort}
sed --help
sort --help

look reasonable?

Cheers,

Tony
hagen wegner
2018-09-08 07:56:49 UTC
Permalink
Hi Tony,

sed was fine but sort wasn't. I had a script of that name in my ~/bin directory. After removing that it seems to be running. Maybe the system commands should have the full path as in '/usr/bin/sort' but it looks rather that I should not have written a wrapper around a system command.

Thank you very much for your help !

Regards,
Hagen
.


--------------------------------------------
On Sat, 9/8/18, Tony Theodore <***@logyst.com> wrote:

Subject: Re: [Mingw-cross-env-list] problems compiling qtbase with mxe
To: "hagen wegner" <***@yahoo.com>
Cc: mingw-cross-env-***@nongnu.org
Date: Saturday, September 8, 2018, 4:02 AM
Post by hagen wegner
Hi Tony,
I had p7zip
installed before, so I don't think that is the
problem.
Post by hagen wegner
Output
make check-requirements attached.

Looks like it’s getting stuck somewhere
around `sed` or `sort`. Does the output of:

    which {sed,sort}
    sed --help
    sort
--help

look reasonable?

Cheers,

Tony
Tony Theodore
2018-09-08 09:13:02 UTC
Permalink
Post by hagen wegner
Hi Tony,
sed was fine but sort wasn't. I had a script of that name in my ~/bin directory. After removing that it seems to be running. Maybe the system commands should have the full path as in '/usr/bin/sort’
There’s no reliable to do that across systems and it wouldn’t help with
the case of a non-gnu system legitimately installing the gnu version in ~/bin.
Post by hagen wegner
but it looks rather that I should not have written a wrapper around a system command.
Thank you very much for your help !
Glad it’s sorted out - that was a tricky one!

Cheers,

Tony
hagen wegner
2018-09-08 08:24:32 UTC
Permalink
Hi Tony,

I'm afraid still no luck:

c4~/sw/mxe$ make qtbase
[check reqs]
[nonet lib] /home/hagen/sw/mxe/usr/x86_64-pc-linux-gnu/lib/nonetwork.so
[git-log] 5bd414d Update packages.json & build-matrix.html
[build] mxe-conf i686-w64-mingw32.static
[done] mxe-conf i686-w64-mingw32.static 12 KiB 0m5.437s
[build] binutils i686-w64-mingw32.static
[done] binutils i686-w64-mingw32.static 461528 KiB 0m47.778s
[download] mingw-w64-v5.0.4.tar.bz2
[build] mingw-w64 i686-w64-mingw32.static
[done] mingw-w64 i686-w64-mingw32.static 16 KiB 0m5.243s
[download] gmp-6.1.2.tar.xz
[build] mxe-conf x86_64-pc-linux-gnu
[done] mxe-conf x86_64-pc-linux-gnu 12 KiB 0m5.277s
[build] gmp x86_64-pc-linux-gnu
[done] gmp x86_64-pc-linux-gnu 29956 KiB 0m33.422s
[download] isl-0.15.tar.bz2
[build] isl x86_64-pc-linux-gnu
[done] isl x86_64-pc-linux-gnu 41088 KiB 0m20.948s
[download] mpfr-3.1.5.tar.xz
[build] mpfr x86_64-pc-linux-gnu
[done] mpfr x86_64-pc-linux-gnu 15120 KiB 0m20.559s
[download] mpc-1.1.0.tar.gz
[build] mpc x86_64-pc-linux-gnu
[done] mpc x86_64-pc-linux-gnu 6412 KiB 0m10.497s
[download] gcc-5.5.0.tar.xz
[build] gcc i686-w64-mingw32.static
[done] gcc i686-w64-mingw32.static 2858488 KiB 6m44.907s
[download] pkgconf-da179fd.tar.gz
[download] libtool-2.4.4.tar.gz
[build] pkgconf x86_64-pc-linux-gnu
[done] pkgconf x86_64-pc-linux-gnu 1504 KiB 0m7.458s
[build] pkgconf i686-w64-mingw32.static
[done] pkgconf i686-w64-mingw32.static 424 KiB 0m5.238s
[meta] cc i686-w64-mingw32.static
[download] expat-2.2.6.tar.bz2
[build] expat i686-w64-mingw32.static

Failed to build package expat for target i686-w64-mingw32.static!
------------------------------------------------------------
configure to command docbook2x-man of docbook2X.
Or use DOCBOOK_TO_MAN="xmlto man --skip-validation" if you have xmlto around.
You can also configure using --without-docbook if you can do without a man
page for xmlwf.
make[1]: *** [build-only-expat_i686-w64-mingw32.static] Error 1
make[1]: Leaving directory `/home/hagen/sw/mxe'
real 0m7.796s
user 0m6.605s
sys 0m1.379s
------------------------------------------------------------
[log] /home/hagen/sw/mxe/log/expat_i686-w64-mingw32.static

make: *** [/home/hagen/sw/mxe/usr/i686-w64-mingw32.static/installed/expat] Error 1



Any ideas?

And why is it building mingw32? I am looking for a 64-bit version of gcc and qt.

Regards,
Hagen
.
Tony Theodore
2018-09-08 09:07:08 UTC
Permalink
Post by hagen wegner
...
Failed to build package expat for target i686-w64-mingw32.static!
------------------------------------------------------------
configure to command docbook2x-man of docbook2X.
Or use DOCBOOK_TO_MAN="xmlto man --skip-validation" if you have xmlto around.
You can also configure using --without-docbook if you can do without a man
page for xmlwf.
docs should generally be disabled, `--without-docbook` added in:
https://github.com/mxe/mxe/commit/842827a489087b77f51554655c0d4f48ddebd5a5
Post by hagen wegner
And why is it building mingw32? I am looking for a 64-bit version of gcc and qt.
By default, it will build 32-bit static. Use:

make MXE_TARGETS=x86_64-w64-mingw32.static

or set the targets in `settings.mk`

Cheers,

Tony
hagen wegner
2018-09-12 08:37:17 UTC
Permalink
Hi Tony,

I changed the settings.mk and modified the expat.mk file. The load and build ran fine this time, so thank you very much for your help !

The compile of my project did not work following instructions here: https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows/14170591#14170591 . The path to the g++ compiler and linker were not in the Makefile. After adding those by hand the compile worked fine but the executable started on windows doesn't work. Simply does nothing. But I think this has nothing to do with the cross compile environment as such.

Maybe you can answer the question regarding qt: the cross compile qmake creates three makefiles: Makefile, Makefile.Debug and Makefile.Release. Which one do I have to use?

Regards,
Hagen
.
--------------------------------------------
On Sat, 9/8/18, Tony Theodore <***@logyst.com> wrote:

Subject: Re: [Mingw-cross-env-list] problems compiling qtbase with mxe
To: "hagen wegner" <***@yahoo.com>
Cc: mingw-cross-env-***@nongnu.org
Date: Saturday, September 8, 2018, 9:07 AM
Post by hagen wegner
...
Failed to build
package expat for target i686-w64-mingw32.static!
------------------------------------------------------------
Post by hagen wegner
  configure to command docbook2x-man of
docbook2X.
Post by hagen wegner
  Or use
DOCBOOK_TO_MAN="xmlto man --skip-validation" if
you have xmlto around.
Post by hagen wegner
  You can also
configure using --without-docbook if you can do without a
man
Post by hagen wegner
  page for xmlwf.
docs should
generally be disabled, `--without-docbook` added in:
https://github.com/mxe/mxe/commit/842827a489087b77f51554655c0d4f48ddebd5a5
Post by hagen wegner
And why
is it building mingw32?  I am looking for a 64-bit version
of gcc and qt.

By default,
it will build 32-bit static. Use:

    make
MXE_TARGETS=x86_64-w64-mingw32.static

or set the targets in `settings.mk`

Cheers,

Tony
Volker Diels-Grabsch
2018-09-12 09:16:18 UTC
Permalink
Dear Hagen,
Post by hagen wegner
Maybe you can answer the question regarding qt: the cross compile qmake creates three makefiles: Makefile, Makefile.Debug and Makefile.Release. Which one do I have to use?
You should only use the main Makefile! Ignore the other ones. Those
are executes by the main Makefile as needed. For example, the main
Makefile specifies target rules for "make clean":

release-clean: $(MAKEFILE).Release FORCE
$(MAKE) -f $(MAKEFILE).Release clean
...
debug-clean: $(MAKEFILE).Debug FORCE
$(MAKE) -f $(MAKEFILE).Debug clean

The main rule for "make clean" them simply calls both:

clean: release-clean debug-clean FORCE

In the unlikely case that you really want to clean only one of
the targets, use "make release-clean" or "make debug-clean".

In case that you really want to build just one of the targets, use
"make release" or "make debug".


Regards,
Volker
--
Volker Diels-Grabsch
----<<<((()))>>>----
Loading...