I'm filing this bug (from a template, mind you) because the ebuild I'm reporting it against failed to build once I removed my /usr/bin/{gcc,cc,c++,c99} binaries. This means that the ebuild is relying on gcc or cc as compiler, while it should use "$(tc-getCC)" so that user choices are respected, and cross-compiling works as intended. This usually comes down to one of these tasks: - use emake CC="$(tc-getCC)" for building, to ovewrite make's CC variable (defaults to "cc", some upstream rewrites it); - the above plus replacing explicit "gcc" (or similar) calls with $(CC) so that the variable is actually respected; - tc-export CC in src_compile before eventual econf. For C++, you'd have to replace CC with CXX everywhere above, of course. If your package is a special case on this, please let me know. Thanks, Diego
Currently the ebuild already uses CC="$(tc-getCC) in src_compile. When looking in the INSTALL file of cdrtools [1] it mentions CCOM instead of CC for using a different compiler. So replacing CC="$(tc-getCC) with CCOM="$(tc-getCC) should do the trick. Diego is there an easy way to check if the variable is repected when doing so, if not can you make a second run on your system with this change and check again? [1] FROM INSTALL: Using a different C-compiler: If the configured default compiler is not present on the current machine, the makefilesystem will try an automatic fallback to GCC. For this reason in most cases you will not need to manually select a compiler. The default C-compiler can be modified in the files in the DEFAULT directory. If you want to have a different compiler for one compilation, call: make CCOM=gcc or make CCOM=cc This works even when your make program doesn't propagate make macros.
Hrm... To me it looks like I'll have to make symlinks like so: ln -s x86_64-linux-gcc.rul x86_64-linux-$(tc-getCC).rul (for each arch) to get this to work. Too much trouble, too much variety to consider for my taste. Patches will be accepted.
I also had this problem on ppc64. I use distcc for my updates to a cross-compiler on my 686. I had to turn distcc off for the build to succeed on the ppc64 box.
Created attachment 205345 [details, diff] Patch to cdrtools-2.01.01_alpha57-r1.ebuild to switch to use of qualified gcc name This patch modifies cdrtools-2.01.01_alpha57-r1.ebuild to add two sed calls in src_prepare, which replace use of gcc/g++ with the results of tc-getCC and tc-getCXX, respectively. With this patch applied, I can build and install cdrtools-2.01.01_alpha57-r1 without any apparent call to gcc. The patch also applies automatically to cdrtools-2.01.01_alpha65, albeit with a bit of fuzz. With the patch, that version also builds and installs without any apparent call to gcc.
Created attachment 206903 [details, diff] cdrtools-2.01.01_alpha66.diff If i temporarily remove /usr/bin/{gcc,cc,c++,c99} i get the following error even with the patch attached. make -j3 -j1 'CC=i686-pc-linux-gnu-gcc -D__attribute_const__=const' 'COPTX=-march=native -O2 -pipe -fomit-frame-pointer -finput-charset=ISO-8859-1 -fexec-charset=UTF-8' LIB_ACL_TEST=-lacl CPPOPTX= LDOPTX=-Wl,-O1 GMAKE_NOWARN=true RULES/rules.top:43: RULES/ldummy.lnk: Datei oder Verzeichnis nicht gefunden RULES/rules1.top:250: incs/Dnull: Datei oder Verzeichnis nicht gefunden RULES/rules1.top:257: incs/Dcc.x86-linux: Datei oder Verzeichnis nicht gefunden RULES/rules.top:70: RULES/i686-linux-cc.rul: Datei oder Verzeichnis nicht gefunden RULES/rules.cnf:66: incs/x86-linux-cc/Inull: Datei oder Verzeichnis nicht gefunden RULES/rules.cnf:67: incs/x86-linux-cc/rules.cnf: Datei oder Verzeichnis nicht gefunden ==> MAKING DIRECTORY "incs/x86-linux-cc/Inull" ==> CONFIGURING RULES "incs/x86-linux-cc/rules.cnf" creating cache ./config.cache checking host system type... Invalid configuration `unknownCPU-unknownMFR-unknownOS': machine `unknownCPU-unknownMFR' not recognized checking if sh is bash... yes checking if /bin/sh is bash... yes checking whether sh -ce is broken... no checking whether /bin/sh -ce is broken... no checking whether /bin/bosh is a working shell... no checking whether /opt/schily/bin/bosh is a working shell... no checking for object suffix... configure: error: installation or configuration problem; compiler does not work make: *** [incs/x86-linux-cc/rules.cnf] Fehler 1 The sed needs to be extended to make cdrtools configure normal. See attached patch. Please can someone review this patch as i am not sure if this is the right thing to do. If it is okay i will commit this with the cdrtools-2.01.01_alpha66 version bump.
The fix will be done properly in the upstream's configure script and posted in the ML instead of introducing this hack into the ebuild.
Fixed in cdrtools-2.01.01_alpha66.