i386 build fail with fatal error: sys/types.h: No such file ..

Asked by Sampsa Riikonen on 2018-07-29

My software builds ok with amd64 architecture, but I've been never able to succeed with an i386 build. The build stops at:

fatal error: sys/types.h: No such file or directory

Some lines from the "debian/control" file:

Build-Depends: build-essential, libc6-dev, yasm, cmake, pkg-config, swig, libglew-dev, mesa-common-dev, libstdc++-5-dev, python3-dev, python3-numpy, libasound2-dev

Depends: python3, mesa-utils, libstdc++5, glew-utils, python3-numpy

Help appreciated!

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Sampsa Riikonen
Solved:
2018-07-29
Last query:
2018-07-29
Last reply:
2018-07-29
Colin Watson (cjwatson) said : #1

Please provide a link to the failing build.

woops.. indeed

Before compiling live555, I'm configuring it as 64-bit with ..

./genMakefiles linux-64bit

So I get ..

c++ -c -Iinclude -I../UsageEnvironment/include -I../groupsock/include -m64 ...

How can I probe compile time which architecture I'm on?

"arch" command, of course..

After I fix that, do I need to add

libc6-dev-i386

to build-depends ?

Colin Watson (cjwatson) said : #5

Why are you including -m64 in the compiler flags at all? It isn't necessary when doing a native build on amd64. Keep things simple and you'll have fewer problems.

Colin Watson (cjwatson) said : #6

(Also using "arch" in your build is wrong - don't do that. I'm not going to provide an alternative here because I don't think you need one in order to solve your problem.)

Thanks for the suggestion. A small follow-up question.

I'd like to test the ppa build process on a given architecture, without messing up the current "bionic" or "xenial" packages.

Is there a distro name that would correspond to a test distro, say "unstable" or the like, i.e. in debian/changelog I could write something like

valkka (0.5.1-0ubuntu1-unstable) unstable; urgency=low

I'm using the current unstable ubuntu distro (cosmic) to test the architectures (one by one).

Colin Watson (cjwatson) said : #9

That sort of works, but a cleaner way would be to create a separate test PPA and send your test uploads there.