简体   繁体   中英

Compiling 32bit Qt on 64bit Linux - fatal error: gnu/lib-names-32.h

Edit: I finally found the answer here . I'd been doing searches that were too specific and when I did a more general search I found that.

I'm trying to compile a 32bit version of Qt 5.6.2 on 64bit Linux Mint, but I'm getting the error fatal error: gnu/lib-names-32.h .

Just to go through what I've done, I used the below configuration command:

./configure -platform linux-g++-64 -xplatform linux-g++-32 -prefix /home/matthew/Qt/Qt5.6.2-S32 -static -opensource -confirm-license -make libs

I then built it with make -j4 . I got some compilation errors which where solved by installing gcc-multilib and g++-multilib , but then ran into another error.

Searching for solutions to the latest error, most people suggest installing libx32gcc-4.8-dev and libc6-dev-i386 , but I still get the same error.

Does anybody know what I need to install to build 32bt Qt on 64bit Linux Mint?

I finally found the answer here . I'd been doing searches that were too specific and when I did a more general search I found the answer.

You can try installing ia32 libs.

sudo aptitude install ia32-libs

Are you following a tutorial? If so, please, include the link. Could you also please explain your motivation to install 32b Qt libs on your 64b machine?

I had the same issue on the Linux Mint 18.3 x64 , but all solutions found here did't solve the problem.

I've made some dig up and found that the only headers i have is these:

>find /usr/include -iname lib-names*
/usr/include/x86_64-linux-gnu/gnu/lib-names-64.h
/usr/include/x86_64-linux-gnu/gnu/lib-names.h

Seems this package ( libc6-dev:amd64 ) is responsible for these files:

>dpkg -S /usr/include/x86_64-linux-gnu/gnu/lib-names-64.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/gnu/lib-names-64.h
>dpkg -S /usr/include/x86_64-linux-gnu/gnu/lib-names.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/gnu/lib-names.h

I've tried to remove it:

>sudo apt remove libc6-dev:amd64
... to DELETE:
  build-essential g++ g++-5 g++-5-multilib g++-multilib gcc-5-multilib gcc-multilib lib32stdc++-5-dev libc6-dev
  libc6-dev-i386 libc6-dev-x32 libstdc++-5-dev libx32stdc++-5-dev

If try to reinstall the deleted packages nothing would change. But if change one package just like that ( libc6-dev:i386 instead of libc6-dev ):

>sudo apt-get install build-essential g++ g++-5 g++-5-multilib g++-multilib gcc-5-multilib gcc-multilib lib32stdc++-5-dev libc6-dev:i386
libc6-dev-i386 libc6-dev-x32 libstdc++-5-dev libx32stdc++-5-dev

Now it has installed the required headers:

>find /usr/include -iname lib-names*
/usr/include/i386-linux-gnu/gnu/lib-names.h
/usr/include/i386-linux-gnu/gnu/lib-names-32.h
/usr/include/x86_64-linux-gnu/gnu/lib-names-64.h
/usr/include/x86_64-linux-gnu/gnu/lib-names.h

It looks like some dependency links are broken or not complete.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM