I am running the following command, with the verbose output below it:
$ clang++ -m32 -I ../include -o format.cc.o -c format.cc -v
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: i386-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: 32;@m32
"/usr/lib/llvm-6.0/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name format.cc -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -dwarf-column-info -debugger-tuning=gdb -v -coverage-notes-file /home/TABLETOPMEDIA/robert/frontend/Core/ThirdParty/fmt/src/format.cc.gcno -resource-dir /usr/lib/llvm-6.0/lib/clang/6.0.0 -I ../include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++ -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/x86_64-linux-gnu/32 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/backward -internal-isystem /usr/include/clang/6.0.0/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-6.0/lib/clang/6.0.0/include -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/TABLETOPMEDIA/robert/frontend/Core/ThirdParty/fmt/src -ferror-limit 19 -fmessage-length 142 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o format.cc.o -x c++ format.cc
clang -cc1 version 6.0.0 based upon LLVM 6.0.0 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/x86_64-linux-gnu/32"
ignoring nonexistent directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/backward"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include/clang/6.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
../include
/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++
/usr/include/clang/6.0.0/include
/usr/local/include
/usr/include/i386-linux-gnu
/usr/include
End of search list.
In file included from format.cc:8:
In file included from ../include/fmt/format-inl.h:11:
../include/fmt/format.h:31:10: fatal error: 'algorithm' file not found
#include <algorithm>
^~~~~~~~~~~
1 error generated.
I'm on Ubuntu 18.04 (64-bit) compiling using 32-bit libraries. I do have STL headers at /usr/include/c++/7
, but this doesn't appear to be in the paths shown above. Is this an OS problem with my Ubuntu installation? Which packages might I be missing if so?
EDIT
I have g++-multilib
installed:
$ dpkg -l | grep multilib
ii g++-7-multilib 7.3.0-25ubuntu1~18.04 amd64 GNU C++ compiler (multilib support)
ii g++-multilib 4:7.3.0-3ubuntu2 amd64 GNU C++ compiler (multilib files)
ii gcc-7-multilib 7.3.0-25ubuntu1~18.04 amd64 GNU C compiler (multilib support)
ii gcc-8-multilib 8.1.0-10ubuntu1~18.04 amd64 GNU C compiler (multilib support)
ii gcc-multilib 4:7.3.0-3ubuntu2 amd64 GNU C compiler (multilib files)
However, it only shows installed for amd64
, assuming I need the i386
version, I tried installing that but it fails:
$ sudo apt install g++-multilib:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
g++-multilib:i386 : Depends: gcc-multilib:i386 (>= 4:7.3.0-3ubuntu2) but it is not going to be installed
Depends: g++:i386 (>= 4:7.3.0-3ubuntu2) but it is not going to be installed
Depends: g++-7-multilib:i386 (>= 7.3.0-12~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Weirdly, I have a foreign architecture installed through dpkg
and I was hoping the i386
versions of packages would be automatically installed for me:
$ dpkg --print-foreign-architectures
i386
0 Answers