1

I am building a glibc-source for arm architecture but I am getting the following issue.

I have run the following commands:

apt-get source glibc-source
sudo apt-get build-dep glibc-source

Changed the file control.mk to target arm:

vi ../debian/rules.d/control.mk 
libc_archs :=arm

sudo TARGET=arm dpkg-buildpackage -us -uc -b -d -rfakeroot

After running the above command, I am getting the following error (even though I mentioned Target as arm, still it is building for amd64):

make[3]: fork: Resource temporarily unavailable
make[3]: Leaving directory '/home/systebui/glibc-2.5/glibc-2.23/gmon'
Makefile:230: recipe for target 'gmon/subdir_lib' failed
make[2]: *** [gmon/subdir_lib] Error 2
make[2]: Leaving directory '/home/systebui/glibc-2.5/glibc-2.23'
Makefile:9: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/systebui/glibc-2.5/glibc-2.23/build-tree/amd64-libc'
debian/rules.d/build.mk:105: recipe for target '/home/systebui/glibc-2.5/glibc-2.23/stamp-dir/build_libc' failed
make: *** [/home/systebui/glibc-2.5/glibc-2.23/stamp-dir/build_libc] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

If I am not changing the control.mk file then it successfully runs without errors, but for x86,i386 and not for arm and arm64 architectures.

Can anyone please let me know how to set the Target for Building a Glibc for arm and arm64?

Thanks in advance

  • 2
    There are armhf/arm64 packages for libc in Ubuntu already. Why do you need to rebuild it? The packages are built directly on ARM hardware, and not cross-compiled, so you won't be able to simply cross-compile in the way that you are trying to do. I don't think 'arm' is a valid arch definition for glibc either, though. – dobey May 12 '18 at 12:55
  • 1
    Possible duplicate of [How can I build i386 and amd64 packages on my amd64 laptop using debuild](https://askubuntu.com/questions/595226/how-can-i-build-i386-and-amd64-packages-on-my-amd64-laptop-using-debuild) – David Foerster May 12 '18 at 15:35
  • Concerning the only answer to the linked question: the chroot option won't work in your case but the other options remain, including the given `debuild` flags. – David Foerster May 12 '18 at 15:37
  • i am building glibc-source on my x86 machine i need to build it for arm architecture. – shaikh ishaque May 13 '18 at 05:50

0 Answers0