Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 833284

Summary: cross-x86_64-w64-mingw32/mingw64-runtime cannot emerge with libraries use flag
Product: Gentoo Linux Reporter: Adel KARA SLIMANE <adel.ks>
Component: Current packagesAssignee: Cross compilation support <cross>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=833207
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: x86_64 build log
x86_64 emerge pqv
x86_64 emerge info

Description Adel KARA SLIMANE 2022-02-13 18:45:17 UTC
Created attachment 765012 [details]
x86_64 build log

Re-emerging cross-x86_64-w64-mingw32/mingw64-runtime with the "librarires" useflag fails at the configure step with

```
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/cross-x86_64-w64-mingw32/mingw64-runtime-9.0.0/work/mingw-w64-v9.0.0/mingw-w64-libraries/libmangle':
configure: error: C compiler cannot create executables
See `config.log' for more details
```

same happens the i686 version

Any ideas ?

Thanks!
Comment 1 Adel KARA SLIMANE 2022-02-13 18:45:30 UTC
Created attachment 765013 [details]
x86_64 emerge pqv
Comment 2 Adel KARA SLIMANE 2022-02-13 18:45:47 UTC
Created attachment 765014 [details]
x86_64 emerge info
Comment 3 Adel KARA SLIMANE 2022-02-13 18:47:24 UTC
This bug report is probably the reason behind bug https://bugs.gentoo.org/833207
Comment 4 James Le Cuirot gentoo-dev 2022-02-13 21:21:30 UTC
IIRC you have to build it without libraries first, and then enable after that.
Comment 5 Adel KARA SLIMANE 2022-02-13 21:48:03 UTC
I do have it installed without libraries, but then it fails to emerge, as you can see in the emerge -pqv attachment. I don't know why it's like this
Comment 6 Adel KARA SLIMANE 2022-02-13 21:49:18 UTC
Initially I use this script to initially build the cross toolchain, maybe I am doing something wrong in that:

```
#!/bin/bash

echo "######################################"
echo "Generating x86_64-w64-mingw32"
echo "######################################"

crossdev --target cross-x86_64-w64-mingw32
crossdev --lenv 'USE="libraries"' \
--genv 'EXTRA_ECONF="--enable-threads=posix"' \
--init-target --target cross-x86_64-w64-mingw32
env USE="libraries" emerge --oneshot cross-x86_64-w64-mingw32/mingw64-runtime
env USE="libraries" emerge --oneshot cross-x86_64-w64-mingw32/gcc

# i686

echo "######################################"
echo "Generating i686-w64-mingw32"
echo "######################################"

crossdev --target cross-i686-w64-mingw32
crossdev --lenv 'USE="libraries"' \
--genv 'EXTRA_ECONF="--enable-threads=posix --disable-sjlj-exceptions --with-dwarf2"' \
--init-target --target cross-i686-w64-mingw32
env USE="libraries" emerge --oneshot cross-i686-w64-mingw32/mingw64-runtime
env USE="libraries" emerge --oneshot cross-i686-w64-mingw32/gcc

```
Comment 7 Adel KARA SLIMANE 2022-03-07 18:06:37 UTC
Okay something changed and I need to enable more flags than "libraries", mingw64-runtime needs "libraries idl tools", this code snippet works

```
#!/bin/bash

echo "######################################"
echo "Generating x86_64-w64-mingw32"
echo "######################################"

crossdev --target cross-x86_64-w64-mingw32
crossdev --lenv 'USE="libraries"' \
--genv 'EXTRA_ECONF="--enable-threads=posix"' \
--init-target --target cross-x86_64-w64-mingw32
env USE="libraries idl tools" emerge --oneshot cross-x86_64-w64-mingw32/mingw64-runtime
env USE="libraries" emerge --oneshot cross-x86_64-w64-mingw32/gcc

# i686

echo "######################################"
echo "Generating i686-w64-mingw32"
echo "######################################"

crossdev --target cross-i686-w64-mingw32
crossdev --lenv 'USE="libraries"' \
--genv 'EXTRA_ECONF="--enable-threads=posix --disable-sjlj-exceptions --with-dwarf2"' \
--init-target --target cross-i686-w64-mingw32
env USE="libraries idl tools" emerge --oneshot cross-i686-w64-mingw32/mingw64-runtime
env USE="libraries" emerge --oneshot cross-i686-w64-mingw32/gcc
```