Building icu4c fails due to missing findBasename - icu

I try to cross-compiler icu4c 51.1 with Emscripten (clang) via
emconfigure source/configure --host=i386-pc-linux-gnu --prefix=${myprefix} --enable-static --disable-shared --disable-dyload --disable-renaming CXXFLAGS='-DU_USING_ICU_NAMESPACE=0' CPPFLAGS='-DU_DISABLE_RENAMING=1'
emmake make
emmake make install
It compiles most of the sources fine, but fails with
Unpacking ../source/data/in/icudt51l.dat and generating out/tmp/icudata.lst (list of data files)
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/icupkg -d ./out/build/icudt51l --list -x \* ../source/data/in/icudt51l.dat -o out/tmp/icudata.lst
run-detectors: warning: unable to exec /usr/bin/lli-2.8: No such file or directory
run-detectors: warning: unable to exec /usr/bin/lli-2.9: No such file or directory
LLVM ERROR: Program used external function 'findBasename' which could not be resolved!
make[1]: *** [out/tmp/icudata.lst] Error 1
make[1]: Leaving directory `/home/andreas/.emscripten-libs/sources/icu4c/51.1/data'
make: *** [all-recursive] Error 2
So I am wondering, where it tries to find findBasename and what this data compiling is all about.
EDIT:
The error messages come from icupkg being built with clang, which does not make sense in this case. How can I specifc that the libraries are built with clang, but the tools with another compiler?

Sounds like it wasn't able to find, I'm guessing, ICU tool utilities lib in ../lib - might try running ldd or equivalent on icupkg

Related

Asterisk make crashes with cannot find -lwebrtc-x86_64-unknown-linux-gnu

I do ./configure with-pjproject-bundled, and it runs OK. Then, I issue make, and it crashes with cannot find -lwebrtc-x86_64-unknown-linux-gnu. Full stack here:
CC="cc" CXX="g++" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C
menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/local/asterisk-14.4.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/local/asterisk-14.4.0/menuselect'
Generating input for menuselect ...
menuselect/menuselect --check-deps menuselect.makeopts
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
[LD] libasteriskpj.o -> libasteriskpj.so.2
/usr/bin/ld: cannot find -lwebrtc-x86_64-unknown-linux-gnu
collect2: error: ld returned 1 exit status
make[1]: *** [libasteriskpj.so.2] Error 1
make: *** [main] Error 2
I use RedHat 7.3 and Asterisk 14.4.
If I do ./configure without parameters, then make runs without an error. What am I doing wrong?
You’re simply missing a library. Run this command to install it:
yum install webrtc-audio-processing-devel
Then clear out your settings before running configure again:
make clean all
I’m not at my computer now but I believe there’s a script bundled with the code that installs all the dependencies for you. Might be worth checking out.

How to solve "cstring: No such file or directory" when compiling gcc from source?

I am trying to compile a gcc from source since I cannot use yum, apt-get and so forth. My steps are simple:
-I download the source GCC (I tried gcc-4.8.4 and gcc-5.3.0) in my pc and I used:
./contrib/download_prerequisites
-After this, I send this my gcc source file to my system using powerPC y Linux.
mkdir objdir
cd objdir
../gcc-4.6.2/configure --prefix=/usr --enable-languages=c,c++,fortran,go
make
I have got the next error:
In file included from ../../gcc-4.9.2/gcc/genmddeps.c:19:0:
../../gcc-4.9.2/gcc/system.h:205:20: fatal error: cstring: No such file or directory
# include <cstring>
^
compilation terminated.
make[3]: *** [build/genmddeps.o] Error 1
make[3]: Leaving directory `/home/root/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/root/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/root/build'
make: *** [all] Error 2
Any idea about what it is going wrong?
Best regards
Some advice: first, compile (notably for learning purposes) something simpler than GCC, e.g. GNU make if you never compiled GNU stuff from source code.
Then compile a recent GCC (so 5.3 in january 2016) - building issues would be the same with 4.8, and GCC 5 is better! You need the gcc & libc-dev & g++ & libstdc++-dev for your host machine (the one running your future cross-compiler). I am not sure your --prefix=/usr is a good idea. Consider perhaps a --program-suffix=-mine option (otherwise, your system's /usr/bin/gcc could be overwritten, which you don't want to happen)
You could leave the default --prefix=/usr/local and later add appropriately /usr/local/bin/ into your PATH

Can't build cross compiler

I can't seem to build Rust as a cross-compiler, either on Windows with MSYS2 or on a fresh install of Debian Wheezy. The error is the same for both. I run this configure:
./configure --target=arm-unknown-linux-gnueabihf,x86_64-pc-windows-gnu
make works, but then make install fails with:
[...]
prepare: tmp/dist/rustc-1.0.0-dev-x86_64-pc-windows-gnu-image/bin/rustlib/x86_64-pc-windows-gnu/lib/rustdoc-*.dll
prepare: tmp/dist/rustc-1.0.0-dev-x86_64-pc-windows-gnu-image/bin/rustlib/x86_64-pc-windows-gnu/lib/fmt_macros-*.dll
prepare: tmp/dist/rustc-1.0.0-dev-x86_64-pc-windows-gnu-image/bin/rustlib/x86_64-pc-windows-gnu/lib/libmorestack.a
prepare: tmp/dist/rustc-1.0.0-dev-x86_64-pc-windows-gnu-image/bin/rustlib/x86_64-pc-windows-gnu/lib/libcompiler-rt.a
compile: arm-unknown-linux-gnueabihf/rt/arch/arm/morestack.o
make[1]: arm-linux-gnueabihf-gcc: Command not found
/home/Sandro/rust/mk/rt.mk:94: recipe for target 'arm-unknown-linux-gnueabihf/rt/arch/arm/morestack.o' failed
make[1]: *** [arm-unknown-linux-gnueabihf/rt/arch/arm/morestack.o] Error 127
make[1]: Leaving directory '/home/Sandro/rust'
/home/Sandro/rust/mk/install.mk:22: recipe for target 'install' failed
make: *** [install] Error 2
Everything builds fine if I don't specify a cross architecture. Am I missing some special configure flag to make this work?
The error message says that make did not find the arm-linux-gnueabihf-gcc binary, which is supposed to be a C compiler producing ARM code. That means that you probably don't have any ARM C cross-compilation toolchain installed.
I know Ubuntu has packages for cross compilers (gcc-arm-linux-gnueabihf in 14.04) so Debian may have the same packages. You can also find fully packaged ARM C cross-compilers for Windows and Linux on the Linaro website. If you are building for the Rapsberry Pi, you can also find toolchains to build for Raspbian and Archlinux on https://github.com/raspberrypi/tools.
Here is an example under Linux with a Linaro toolchain (should be distribution-agnostic for the host)
$ wget http://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz
$ tar -xf gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf.tar.xz
$ export PATH=$PATH:$PWD/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin
$ cd <your_configured_rustc_build_directory>
$ make
You can then use the cross compiler with the following line. You can provide the full path to the arm-linux-gnueabihf-gcc binary if you don't want to put it in your PATH.
rustc --target=arm-unknown-linux-gnueabihf -C linker=arm-linux-gnueabihf-gcc hello.rs
If you are using Cargo, you can specify the linker to use for each target in the .cargo/config with this option:
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

g77 compiling errors (cannot find crt1.o, crti.o, -lgcc_s)

I really need some help. I'm trying to compile and execute some programs for my Thesis.
The problem is, I never used Fortran before, so I'm blindly relying on the documentation....it said to use a few commmands to do the work, specifically
setenv bc03 PATH TO SRC DIRECTORY
cd $bc03
source ./.bc_cshrc
So, i Installed Ubuntu 14.04 (I was working on Windows, which is another issue, I'm new to Linux too), and used these commands in the terminal.
At first it didn't work 'cause it couldn't recognize the g77 command, I followed a tutorial to install g77, launched the "make all" command again, and it seems it partially works.
As I get it, the compiler creates a bunch of .o files in the directory, but when it comes to compile the 6 main programs
"make bin_ised ascii_ised vel_disp csp_galaxev add_bursts downgrade_resolution"
it gives me these errors (I translated some parts from Italian)
make[1]: entering directory "/home/lews/Documenti/bc03/src"
g77 -ffixed-line-length-132 bin_ised.f ./public_utilities.a -o bin_ised
/usr/bin/ld: cannot find crt1.o: File o directory non esistente
/usr/bin/ld: cannot find crti.o: File o directory non esistente
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make[1]: *** [bin_ised] Errore 1
make[1]: leaving directory "/home/lews/Documenti/bc03/src"
make: *** [all] Errore 2
I'm kind lost here, as I told you I'm new to both Fortran and Linux, so I really can't figure it out....thanks for the help!
Ditch g77. It has been unsupported for years and, quite apparently, is not correctly configured on your system (libraries missing).
Use gfortran instead, which comes with all major Linux installations. gfortran is compatible with g77, wich a few very minor exceptions.
If your build script explicitly mentions g77, replace that by gfortran, and adjust the other flags if necessary.
I think gfortran-4.9 is the current Ubuntu package.

gcc 4.8.1 will not make

I have a new installation of Ubuntu linux and I am trying to update my gcc complier. The latest gcc compiler depends on gmp, mpfr, and mpc, so I downloaded those and placed the source into the gcc 4.8.1 source folder, as instructed.
configure seems to have run just fine. I did not include any options, because none seemed appropriate. I just ran with the defaults.
When I run make, I get the following error:
configure: error: C++ compiler missing or inoperational
make[2]: \*** [configure-stage1-libcpp] Error 1
make[2]: Leaving directory `/home/clay/programming/C++/gcc-4.8.1'
make[1]: \*** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/clay/programming/C++/gcc-4.8.1'
make: \*** [all] Error 2
I am running out of a terminal window as root, and I did a make distclean and tried a second time, but no dice. I know it can find both gcc and cc because it says so in the make output.
Any ideas?
You need a C++ compiler to build GCC. On Ubuntu, the C++ compiler is in the package g++, separate from gcc (which is a C compiler, not a C++ compiler), so be sure to:
sudo apt-get install g++
first you should ensure a C++ compiler to build on your machine
yum install gcc-c++

Resources