Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many errors while building the toolchain #4

Closed
totologic opened this issue Oct 21, 2018 · 10 comments
Closed

Many errors while building the toolchain #4

totologic opened this issue Oct 21, 2018 · 10 comments

Comments

@totologic
Copy link

Hi.

Using Debian running in a virtualbox, I face many issues when building the toolchain:

[...]
Makefile:11025: recipe for target 'install-target-libgcc' failed
make[2]: *** [install-target-libgcc] Error 2
make[2]: Leaving directory '/home/cedric/ngdevkit-master/build/nggcc'
Makefile:2249: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/cedric/ngdevkit-master/build/nggcc'
Makefile:125: recipe for target 'build/nggcc' failed
make: *** [build/nggcc] Error 2

I am not an experimented Linux user.

@totologic totologic changed the title Many errors in building while building the toolchain Many errors while building the toolchain Oct 21, 2018
@dciabrin
Copy link
Owner

Can you specify which version of Debian you're hitting the issue on?

@totologic
Copy link
Author

Of course. These are the full details of my virtual machine configuration:

memory: 2.0 GiB
processor: Intel® Core™ i7-8550U CPU @ 1.80GHz
graphics: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits)
base system: Debian GNU/Linux 9 (stretch) 64-bit
virtualization : oracle

The iso I used to install Debian was the debian-9.5.0-amd64-netinst.iso

Prior to build the tool chain, I made the pre-requisite. I precise that I had to add the small fix suggested by ozzyyzzo4096

apt-get install gcc curl
GCC_VERSION_PKG=$(apt-cache depends gcc | awk '/Depends.*gcc/ {print $2}')
apt-get build-dep $GCC_VERSION_PKG
apt-get install graphicsmagick-imagemagick-compat
apt-get build-dep sdcc
apt-get install imagemagick
apt-get install libsdl2-dev
apt-get install python-pygame

@dciabrin
Copy link
Owner

Hey thx for your report, I indeed found a bug during the end of the devkit compilation, that one is fixed in 565f7b6

However when I tested on a pristine Debian Stretch set up with virt-builder, I could not reproduce your specific error during gcc compilation, nor the missing dependency :/

# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Before compiling the entire devkit, I made sure to update to the very latest Debian packages:

sudo apt-get update
sudo apt-get upgrade

Could you maybe try with that and make sure you have installed all the prerequisites? Then in the ngdevkit directory:

make distclean
make

If you still have the issue, I'd appreciate to see the entire compilation log to spot the first error.

@dciabrin
Copy link
Owner

Oh, when using the image you mentioned, I'm apparently hitting different mirrors and I can see now that package imagemagick is deprecated in favor of graphicsmagick and graphicsmagick-imagemagick-compat.

I'll update README.md accordingly shortly.

@totologic
Copy link
Author

I decided to completly override my Debian installation so I am ready to restart from scratch.

I will try again after your update.

@dciabrin
Copy link
Owner

OK so, it turns out that graphicsmagick not really replaces imagemagick, it only "provides" (in the packaging sense) it via graphicsmagick-imagemagick-compat.

imagemagick for some reason seems to be needed by one of the build dependencies that are being installed in the README. So in 8a81c19, I make sure to install it before everything else and graphicsmagick-imagemagick-compat is not required anymore.

Could you update to this revision and try to rebuild the entire toolkit now?

apt-get update
apt-get upgrade
make distclean
make

I've used the same apt mirrors as your Debian image, and installing the deps in that new order seems to be sufficient for the building process to finish successfully.

@totologic
Copy link
Author

The result of apt-get build-dep sdcc (in pre-requisite) is the following:

**Reading package lists... Done
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:
builddeps:sdcc : Depends: graphicsmagick-imagemagick-compat but it is not going to be installed
E: Unable to correct problems, you have held broken packages.**

Is it good sign ? I have stopped and will continue after your opinion.

@dciabrin
Copy link
Owner

Hmm, I have no idea why the build succeeded on my VM and not on yours, but I know why apt wants to install graphicsmagick dependencies:

ngdevkit@ngdk:~$ apt-cache showsrc sdcc
Package: sdcc
Binary: sdcc, sdcc-libraries, sdcc-ucsim, sdcc-doc
Version: 3.5.0+dfsg-2
Maintainer: Gudjon I. Gudjonsson <gudjon@gudjon.org>
Uploaders: Bdale Garbee <bdale@gag.com>
Build-Depends: autoconf, autotools-dev, bison, debhelper (>= 9), dpkg-dev (>= 1.16.1~), flex, gputils, libboost-dev, libncurses5-dev, libtool
Build-Depends-Indep: ghostscript, graphicsmagick-imagemagick-compat, lyx, texlive-fonts-recommended, texlive-generic-recommended, texlive-latex-recommended, gsfonts**
[...]

In fact, there are the only dependencies that we need to rebuild sdcc for ngdevkit are the 'Build-Depends" ones, we can get rid of the "Build-Depends-Indep" ones.

So, I think you can fix your problem by replacing "apt-get build-dep sdcc" with "apt-get build-dep --arch-only sdcc".

I just did that on a Debian 9 for WSL (windows 10), and the dependencies installed fine and the build process finished as expected.

Could you give it a try? If that fixes the problem I'll push a commit with that change in the various README files.

@totologic
Copy link
Author

Yes it works with well "apt-get build-dep --arch-only sdcc"

@dciabrin
Copy link
Owner

Pushed the according doc update, thanks for reporting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants