Building util-linux: unsupported hardcode properties - linux

I'm trying to build util-linux on ubuntu 12.04.
But make stops with this error:
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.
make[2]: *** [libblkid.la] Error 1
After googling this error, it seems to me this kind of error is linked with "cross compilation". Although i'm building it in native environment.
The error occurs during linking libblkid
I then tried building it with ./configure --disable-libblkid, then it stops with the same error. This time it chokes when building libfdisk. And it turns out i can't disable building libfdisk.
So i'm very curious about what this error actually means?
EDIT:
During ./autogen.sh this error comes up. Although it does not stop the process.
configure.ac:129: error: Could not locate the pkg-config autoconf
macros. These are usually located in /usr/share/aclocal/pkg.m4.
If your macros are in a different location, try setting the
environment variable AL_OPTS="-I/other/macro/dir" before running
./autogen.sh or autoreconf again.

Related

Yum reports an error:CRITICAL:yum.cli:Config error: Error accessing file for config file:///etc/yum.conf

My environment: python3.8, gcc12.2, cmake4.3. I want to compile and install the glibc library. When I finish compiling and installing, my yum has an error
The following is the error content:
CRITICAL:yum.cli:Config error: Error accessing file for config file:///etc/yum.conf
But I obviously have /etc/yum.conf, but I still get an error
I hope to know why and get a solution, thank you
I downloaded and compiled glibc, and the installation was successful, but there was an error message after installation
collect2: error: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
make[1]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/opt/glibc-2.29'
make: *** [Makefile:12:install] 错误 2
But I found on the net that this error doesn't affect anything

Seeing bzlib.h not found when trying the Bindgen tutorial

I know there is a similar post to this but I followed it and I'm still seeing the issue so I thought I'd ask again sorry. I downloaded the bbindgen-tutorial-bzip2-sys and tried to run it but I get the following error
wrapper.h:1:10: fatal error: 'bzlib.h' file not found
wrapper.h:1:10: fatal error: 'bzlib.h' file not found, err: true
The other user suggested downgrading the Bindgen version in the .toml and I tried that and I still see the issue, also I verified that bzip2 is installed.
Is there a known clang version that works with Bindgen?
Thanks
-------------------------------------------------------Update------------------------------------------------------------------
So I installed the dev bzip files and verified that the library was in a folder that ld looked at by adding the path to LD_LIBRARY_PATH and then updating with ldconfig. I am now able to compile when I run CARGO BUILD,
fred#fred-MS-7B06:~/rust_projects/bindgen-tutorial-bzip2-sys-master$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
however now when I try to run the program with CARGO TEST, as per the tutorial
https://rust-lang.github.io/rust-bindgen/print.html#include-the-generated-bindings-in-srclibrs
I now get the following error:
= note: /bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
I found a post that appeared to have the same issue:
https://dev.to/rrampage/cargo-refused-to-build-my-project---a-rust-debugging-story-25e9
And they fixed it by adding a config.toml file and specified the linker, I tried this and still got the same error. Any ideas as to what I can check I'm a little stuck on this one.
Also I checked the bzip2 dev file that I downloaded from the website:
https://www.sourceware.org/bzip2/
I noticed that there is no file called bz2 but there is a libbz2.def and a libbz2.dsp file, is it possible my ld is incorrectly removing the "lib" from the name?
As noted by #Jmb in the comments, I needed to install libbz2-dev:
sudo apt install libbz2-dev
Since this was a fairly new WSL instance of Ubuntu, I also needed libclang-dev:
sudo apt install libclang-dev

Qt Creator compile error "cannot find -lGL". Other solutions are not working

I have installed QT5 that also comes with QT creator on an amd machine running ubuntu 12.04. My grapics driver is a radeon r9270x if that matters.
When I try to compile a basic "hello world" type Qt program I get the error message "cannot find -lGL". I have searched around and here( Qt: can't find -lGL error ) it says to use "sudo apt-get install libgl1-mesa-dev" but when I do I already have that installed. Here ( Installing Qt on linux, cannot find -lGL ) it says to install "sudo apt-get install libgl-dev" but that only gets me
"Reading package lists... Done Building dependency tree Reading
state information... Done Package libgl-dev is a virtual package
provided by: libgl1-mesa-swx11-dev 8.0.4-0ubuntu0.7
libgl1-mesa-dev-lts-trusty 10.1.3-0ubuntu0.1~precise1
libgl1-mesa-dev-lts-saucy 9.2.1-1ubuntu3~precise1
libgl1-mesa-dev-lts-raring 9.1.7-1ubuntu2~precise1
libgl1-mesa-dev-lts-quantal 9.0.3-0ubuntu0.4~precise1
libgl1-mesa-dev 8.0.4-0ubuntu0.7 You should explicitly select one to
install.
E: Package 'libgl-dev' has no installation candidate"
Various other resources that I have used say to do similar things but I get this error still. Any ideas?
As a side not, not knowing the relevance, I could not get QT creator to launch for the longest time. It would always seg fault and core dump. I finally updated my amd catylist control center/video drivers and that fixed the problem.
Here is the compile output from qt creator:
02:34:21: Running steps for project myHelloWorld... 02:34:21:
Configuration unchanged, skipping qmake step. 02:34:21: Starting:
"/usr/bin/make" g++
-Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64 -Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -o myHelloWorld main.o
-L/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make: *** [myHelloWorld]
Error 1 02:34:21: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project myHelloWorld (kit: Desktop Qt
5.3 GCC 64bit) When executing step "Make" 02:34:21: Elapsed time: 00:00.
Try running this, restart Qt creator and try a clean build.
sudo apt-get install mesa-common-dev
EDIT:
Could be that you just miss Mesa package. Take a look at XCB dependencies listed here and install what’s missing.
I’ve seen this error also mentioned in a different case, but I don’t remember the solution there. I think I had solved the problem by installing the “libglu1-mesa-dev” package.
sudo apt-get install libglu1-mesa-dev -y
But I am not entirely sure if just this had fixed the issue or I had to install anything else.
So what I found worked for me, I manual added the path to the library and compiled. Then I was able to remove the manually added path. I assume somewhere on the backend it was not searching the correct place and once it was shown it remembered and kept the correct location.

Trying to compile linux build of project, cannot find library

I am trying to build a project written in c++ on Linux Mint 16, using...
make -f ./Makefile
and I keep getting this error
/usr/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status
make: *** [BINARY] Error 1
I was getting a lot more of the /usr/bin/ld: cannot find -foo, but I checked in my Makefile and, using the synaptic package manager, installed all the other necessary libraries, eliminating all but this error. I cant seem to find it anywhere, although perhaps I am not looking in the right places.
Thanks.
I had the some problem, right after updating to Linux Mint 17.1. I was trying to build an application with Qt 5 serial port module. Solved by installing: libudev-dev .
try:
sudo apt-get install udev
I don't know how to do that in synaptic, but it should be easier, right?

Error while building glibc

I'm trying to install glibc to debug a C-framework I'm working on. But, I'm getting an error in the build process. Here's the error msg:
make[3]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
/usr/bin/install -c /root/glibc-2.14-build/elf/ld.so /usr/local/myglibc/lib/ld-2.14.so.new
mv -f /usr/local/myglibc/lib/ld-2.14.so.new /usr/local/myglibc/lib/ld-2.14.so
/usr/bin/install -c /root/glibc-2.14-build/libc.so /usr/local/myglibc/lib/libc-2.14.so.new
mv -f /usr/local/myglibc/lib/libc-2.14.so.new /usr/local/myglibc/lib/libc-2.14.so
echo ld-2.14.so /usr/local/myglibc/lib/ld-linux-x86-64.so.2 >> /root/glibc-2.14-build/elf/symlink.list
/usr/bin/install -c /root/glibc-2.14-build/elf/sotruss-lib.so /usr/local/myglibc/lib/audit/sotruss-lib.so.new
mv -f /usr/local/myglibc/lib/audit/sotruss-lib.so.new /usr/local/myglibc/lib/audit/sotruss-lib.so
make[2]: *** No rule to make target `/root/glibc-2.14-build/dlfcn/libdl.so.2', needed by `/root/glibc-2.14-build/elf/sprof'. Stop.
make[2]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/root/glibc-source/glibc-2.14'
make: *** [install] Error 2
Is this a known problem?
I had built glibc on the same machine earlier last week without any errors. I'm rebuilding it because glibc is compiled with optimization level 2(-O2) by default and I'm unable to look into the values of a few variables inside the library functions from the code dump as they've been optimized out. I'm currently trying to compile with optimization level 1.
Thanks
It looks like you are trying to make install, without first doing a successful make all.
This is for the benefit of anyone who might be trying to build glibc on their ubuntu box.
I went through the following problems and resolved them the following way.
These problems were encountered in ubuntu 12.04
I created a directory glib-build on the same level as the glib-VERSION and ran the following command
$> ../glibc-2.16.0/configure --prefix=/home/gugovind/tsapp/glibc/glibc-build/
that gave me the following error that makeinfo is missing.
for that
$>sudo apt-get install texinfo
will resolve the problem.
It threw and error about LD_LIBRARY_PATH having the current directory (even if it does not exist)
for that run the following in your command prompt
$>set LD_LIBRARY_PATH
this will clear the LD_LIBRARY_PATH only for that console temporarily. Then run the configure again.
You might encounter another problem with configure..
"function strtonum never defined"
look at the config.log file and it might be missing mawk or gawk. install them using
sudo apt-get install gawk
This should get you through the configure part.
now run
make all
if in case you encounter a particular file not compiling.. just copy the gcc ... before that and paste it in the command prompt again after you have cd to that directory (the command lines before the error should tell you where to go.)
make install
You might get a warning about not able to find etc/ld.config... file. ignore that..
you are all set now.

Resources