I'm trying to build LLVM and clang on my machine (Ubuntu 12.04). I followed the instructions on http://clang.llvm.org/get_started.html up to step 6 (build LLVM and clang). When I make, I get a whole load of warnings about potentially incompatibly plugin versions (to do with dragonegg?). But the whole thing fails with these messages:
llvm[2]: Linking Debug+Asserts executable llvm-tblgen
/usr/bin/ld: /home/peter/llvm/build/Debug+Asserts/bin/llvm-tblgen: hidden symbol `llvm::Type::~Type()' isn't defined
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/home/peter/llvm/build/Debug+Asserts/bin/llvm-tblgen] Error 1
make[2]: Leaving directory `/home/peter/llvm/build/utils/TableGen'
make[1]: *** [TableGen/.makeall] Error 2
make[1]: Leaving directory `/home/peter/llvm/build/utils'
make: *** [all] Error 1
So any help you could give me would be really helpful.
Thanks
I ended up deleting the llvm folder and checking everything out again, and it worked, so I'm just putting it down to bad timing.
You may want to use the existing LLVM packages, as provided by your distributions.
This askubuntu question about LLVM 3.1 could be relevant.
And you should at least do apt-get build-dep llvm-3.1-dev to ensure all dependencies are available.
You could also ask help on some LLVM related mailing list.
Related
I'm doing some experiment on rpi4, and trying to reproduce this kernel module from github https://github.com/sysprog21/dont-trace on my rpi4. I encounter this problem:
make -C /lib/modules/`uname -r`/build M=/home/ubuntu/dont-trace modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.65-rt49-preemptrt-full-raspi'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110
You are using: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
CC [M] /home/ubuntu/dont-trace/dont_trace.o
/bin/sh: 1: scripts/basic/fixdep: Exec format error
make[2]: *** [scripts/Makefile.build:289: /home/ubuntu/dont-trace/dont_trace.o] Error 126
make[2]: *** Deleting file '/home/ubuntu/dont-trace/dont_trace.o'
make[1]: *** [Makefile:1896: /home/ubuntu/dont-trace] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.65-rt49-preemptrt-full-raspi'
make: *** [Makefile:7: all] Error 2
The kernel here is cross-compiled from x86 server and do show above. I was wondering how to solve this problem & what's the root cause. I can make it on x86 server. It should be something fundamental knowledge I don't understand. Thks!
it seems work this time
My solution might be a bit workaround, but it works. I follow the clues /bin/sh: 1: scripts/basic/fixdep: Exec format error. So I copy the source code to local raspberry pi, and make modules_prepare to construct complete /scripts, then move it into /lib/modules/`uname -r\`/build. It remain the gcc version warning, but work properly.
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.
Currently I have GCC 5.4.0-6 installed on my Ubuntu 16.04.4 machine. However nvcc wants me to use 5.3, so I am trying to install that version as well. I did this by:
1. downloading gcc-5.3.0.tar.gz
2. extracting it to ~/Documents/libraryDownloads/GCC-5/gcc-5.3.0
3. creating the folder ~/Documents/libraryDownloads/GCC-5/gcc-build
4. In ~/Documents/libraryDownloads/GCC-5/gcc-5.3.0 I used the command ./contrib/download_prerequisites.
5. In ~/Documents/libraryDownloads/GCC-5/gcc-build I used the command ./../gcc-5.3.0/configure --enable-multilib
6. and finally in ~/Documents/libraryDownloads/GCC-5/gcc-build I used the command make
The make-process rand for a short while and then ended with the following error:
checking whether the gcc -m32 linker (ld -m elf_x86_64 -m elf_i386) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Makefile:10699: recipe for target 'configure-stage1-zlib' failed
make[2]: *** [configure-stage1-zlib] Error 1
make[2]: Leaving directory '/home/myUser/Documents/libraryDownloads/GCC-5/gcc-build'
Makefile:22461: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/home/myUser/Documents/libraryDownloads/GCC-5/gcc-build'
Makefile:902: recipe for target 'all' failed
make: *** [all] Error 2
As far as I know, I have all prerequisites installed and I am doing all this in a separate build folder as recommended. I tried searching for error: Link tests are not allowed after GCC_NO_EXECUTABLES., but I couldn't find anyone with similar problems. Does anyone know what could be the cause of this error?
I have python2.7.9 on my new Xubuntu installation, albeit it's 14.04.
PySide installation stuck with Shiboken
Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken
After some "googling" I concluded that the problem could be solved with add --enable-shared at ./configure options.
Following docs tried to installed Shiboken in several ways, but after failed, tried to find configure in source files which I couldn't.
Please help. Thank you.
The output is showing that it's trying to link against a static python library, rather than a shared one - i.e. libpython2.7.a, rather than libpython2.7.so.
Thus, it's python that needs to be re-compiled with --enable-shared, not shiboken.
I got an Error while comiling Intel CilkPlus on CentOS 7.
I can post my config.log (was just a bit too big for this post - if it is usefull I will post it)
And here the last lines of the console output:
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... configure: error: in `/home/johannes/b-gcc/x86_64-unknown-linux-gnu/32/libcilkrts':
configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libcilkrts] Fehler 1
make[1]: Leaving directory `/home/johannes/b-gcc'
make: *** [all] Fehler 2
Can anyone help me? I just don't know how to fix this.
It looks like the C++ compiler was not build (or not build properly). Can you please post the command you used (along with the tags) you used to configure the compiler?