fribidi autogen.sh script failing: "autoreconf: error: automake failed with exit status: 1" - autogen

I am trying to install fribidi, but I am getting the following error when running the autogen.sh script:
-n checking for pkg-config...
/usr/local/bin/pkg-config
-n checking for libtoolize...
/usr/local/bin/glibtoolize
-n checking for autoreconf...
/usr/local/bin/autoreconf
running autoreconf --force --install --verbose
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/local/Cellar/autoconf/2.71/bin/autoconf --force
configure.ac:98: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
configure.ac:98: Except in unusual embedded environments, you can safely include all
configure.ac:98: ISO C90 headers unconditionally.
configure.ac:129: warning: your code may safely assume C89 semantics that RETSIGTYPE is void.
configure.ac:129: Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.
autoreconf: running: /usr/local/Cellar/autoconf/2.71/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:40: installing './compile'
configure.ac:37: installing './missing'
configure.ac:31: error: version 'fribidi_version()' doesn't follow Gnits standards
bin/Makefile.am: installing './depcomp'
lib/Headers.mk:25: warning: shell cat $(top_srcdir: non-POSIX variable name
lib/Headers.mk:25: (probably a GNU make extension)
doc/Makefile.am:16: 'lib/Headers.mk' included from here
doc/Makefile.am:21: warning: shell sed '$$d' $(top_srcdir: non-POSIX variable name
doc/Makefile.am:21: (probably a GNU make extension)
gen.tab/Makefile.am:28: warning: 'CFLAGS' is a user variable, you should not override it;
gen.tab/Makefile.am:28: use 'AM_CFLAGS' instead
gen.tab/Makefile.am:29: warning: 'LDFLAGS' is a user variable, you should not override it;
gen.tab/Makefile.am:29: use 'AM_LDFLAGS' instead
lib/Headers.mk:25: warning: shell cat $(top_srcdir: non-POSIX variable name
lib/Headers.mk:25: (probably a GNU make extension)
lib/Makefile.am:15: 'lib/Headers.mk' included from here
autoreconf: error: automake failed with exit status: 1
I already installed libtool and autoconf. How can I fix this problem?

Related

dos2unix doesn't convert the env file even with -f option

When I ran the the npm command, it threw an error like this.
10:13 $ npm install --legacy-peer-deps
> project-client#1.0.0 prepare
> scripts/transpile
/usr/bin/env: ‘bash\r’: No such file or directory
I figured that it had something to do with a line ending issue in Windows, so I tried the following.
✔ /usr/bin
11:00 $ dos2unix env
dos2unix: Failed to open temporary output file: Permission denied
dos2unix: problems converting file env
✘-13 /usr/bin
11:01 $ sudo dos2unix env
dos2unix: Binary symbol 0x02 found at line 1
dos2unix: Skipping binary file env
The answer on the post below says that adding the option -f will force the conversion,
dos2unix: Binary symbol found, skipping binary file
but it still didn't let me convert it.
✔ /usr/bin
11:01 $ sudo dos2unix env -f
dos2unix: Binary symbol 0x02 found at line 1
dos2unix: Skipping binary file env
Is there any work around to deal with this?
First option -f, then the file name:
sudo dos2unix -f env

rpmbuild on CentOS: no such file or directory

I have created a simple RPM on Fedora27 and it worked fine. It just copied files from tar.gz to /usr/bin/.
When I tried to install this RPM on CentOS I got:
# rpm -i RPMS/x86_64/my_rpm-0.0-5.x86_64.rpm --force
error: Failed dependencies:
libc.so.6(GLIBC_2.26)(64bit) is needed by my_rpm-0.0-5.x86_64
So I assumed I will need to create the RPM on CentOS.
But when I do so I get a weird: 'No such file or directory' that I don't get on Fedora27. Here is a sketch of my spec file:
%define _topdir %(pwd)
%define name my_rpm
%define release 5
%define version 0.0
%define buildroot %{_topdir}/%{name}-%{release}-root
BuildRoot: %{buildroot}
Summary: my_rpm
License: -
Name: %{name}
Release: %{release}
Version: %{version}
Source: %{name}-%{version}-%{release}.tar.gz
Prefix: /usr
Group: Tools
%description
This is my_rpm spec file
%prep
%setup -q -n %(arch)/%{name}-%{version}
%install
install -D my_app -t %{buildroot}/usr/bin/my_rpm/
%files
/usr/bin/my_rpm/*
When I try to build the RPM for it I get:
# rpmbuild -v -bb --clean SPECS/bpf.spec
+ install -D app -t /root/rpmbuild/BUILDROOT/my_rpm-0.0-5.x86_64/usr/bin/my_rpm/
install: failed to access '/root/rpmbuild/BUILDROOT/my_rpm-0.0-5.x86_64/usr/bin/my_rpm/': No such file or directory
The same SPEC exactly runs smoothly on Fedora27.
What should I change in it my spec file so that it would work both on Fedora27 and CentOS7? or maybe I can fix my initial problem with Glibc?
EDIT 1
I added the "mkdir -p ..." command under install and the build was successful but it still gives me the same error, that I need Glibc 2.6.
What I don't understand is why during the build it says:
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.26)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.7)(64bit) libc.so.6(GLIBC_2.9)(64bit) libelf.so.1()(64bit) libelf.so.1(ELFUTILS_1.0)(64bit) rtld(GNU_HASH)
Edit 2(solution)
I got it to work. My executables are compiled C code. So I had to re-compile everything on CentOS and then build the rpm. Now it works on both Fedora and CentOS.

Installing older versions of Emacs (19.34)

I am having some trouble installing an older version of emacs (19.34) to run an old script. Currently, I have downloaded the source code and tried to compile but I am getting some error which I don't seem to understand (there are some previous errors with line endings too, but they can be fixed).
I am first running the ./configure script, then running
gmake && gmake install
I am getting this error
Producing `src/paths.h' from `src/paths.in'.
src/paths.h is unchanged
Producing `src/paths.h' from `src/paths.in'.
src/paths.h is unchanged
cd lib-src; gmake all \
CC='gcc' CFLAGS='-g -O' CPPFLAGS='' \
LDFLAGS='' MAKE='gmake'
gmake[1]: Entering directory `/user/b/user1/emacs-19.34/lib-src'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/user/b/user1/emacs-19.34/lib-src'
cd src; gmake all \
CC='gcc' CFLAGS='-g -O' CPPFLAGS='' \
LDFLAGS='' MAKE='gmake'
gmake[1]: Entering directory `/user/b/user1/emacs-19.34/src'
cd ../lwlib/; gmake -w
gmake[2]: Entering directory `/user/b/user1/emacs-19.34/lwlib'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/user/b/user1/emacs-19.34/lwlib'
CC='gcc' CFLAGS='-g -O' MAKE='gmake'
"C_SWITCH_X_SITE=-I/usr/openwin/include"
/bin/sh: C_SWITCH_X_SITE=-I/usr/openwin/include: not found
gmake[1]: *** [really-lwlib] Error 1
gmake[1]: Leaving directory `/user/b/user1/emacs-19.34/src'
gmake: *** [src] Error 2
I have checked that /usr/openwin/include is present in the server, and have manually added /usr/openwin/include to PATH and LD_LIBRARY_PATH. Somehow, the Makefile is not picking it up.
The server config is SunOS 5.10, Generic January 2005. I do not have sudo access, but I have manually set the install path to my local home directory.
Any suggestions?
Thanks in advance!
Edit: Any suggestions that I could install Emacs 19.34 on the server without installing from source would be helpful too.
Where are the double quotes around this line coming from?
"C_SWITCH_X_SITE=-I/usr/openwin/include"
It looks like /bin/sh is complaining about this entire line "not found", rather than setting an environment variable as that line seems to be intended to do.
If this line is not something you set yourself, then trying a different shell (SHELL=/usr/local/bin/bash gmake for example) might work.

X11 problems when compiling openjdk 9 on centos 7

I find problems when I started to compile openjdk for my first time.
Below is what I did
hg clone http://hg.openjdk.java.net/jdk9/dev 9dev
cd 9dev
bash ./get_source.sh
bash ./configure
Then, I got this error message
configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel'.
Then, I did what it told me to do.
After the installation, the same error still exists.
So I checked where the files lies on my machine
rpm -qa | grep X11
libX11-1.6.3-3.el7.x86_64
libX11-common-1.6.3-3.el7.noarch
libX11-devel-1.6.3-3.el7.x86_64
rpm -ql libX11-1.6.3-3.el7.x86_64
/usr/lib64/libX11-xcb.so.1
/usr/lib64/libX11-xcb.so.1.0.0
/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.3.0
so i tried the way of specifying the X11 path
bash ./configure --x-libraries=/usr/lib64
Unfortunately, the same error still stays.
Can someone help me out of here, please?
thx
update
Thank #omajid for directing me to the log file config.log, where I found that the configure is using the gcc in my linuxbrew installation.
configure:56234: /data/alex/git/brew/bin/g++ -o conftest conftest.cpp -lX11 >&5
/data/alex/git/brew/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
configure:56234: $? = 1
So after I exported my c compiler to the system one, the problem was fixed.
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
Here is the relevant packages needed at build time and the configure flags I use in my spec file for building unofficial OpenJDK 9 packages for Fedora/EPEL:
autoconf
automake
alsa-lib-devel
binutils
cups-devel
desktop-file-utils
fontconfig
freetype-devel
elfutils
giflib-devel
gcc-c++
gdb
gtk2-devel
lcms2-devel
libjpeg-devel
libpng-devel
libxslt
libX11-devel
libXi-devel
libXinerama-devel
libXt-devel
libXtst-devel
nss-devel
pkgconfig
xorg-x11-proto-devel
zip
java-1.8.0-openjdk-devel
bash ../configure \
--with-boot-jdk=/usr/lib/jvm/java-1.8.0-openjdk/ \
--with-native-debug-symbols=internal \
--enable-unlimited-crypto \
--with-zlib=system \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-lcms=system \
--with-stdc++lib=dynamic \
--disable-javac-server \
--disable-warnings-as-errors
In any case, the error messages produce by configure are a best guess. You should take a look at config.log to see what test actually failed and what the error messages are. In this case, it looks like you are probably missing one of several X11 libraries. Possibly libXinerama-devel.
If this still doesn't fix your error, please paste the error messages from your autoconf log file (should be named config.log or configure.log, I forget).

rpmbuild no such file or directory

I'm just learning making rpm packages for some custom builds of software that gets compiled from source (some legacy stuff needs this, so I'm trying to learn, as some packages can't use the latest versions), but hitting an error (I'm doing this in Vagrant, and also as root, but typically I'm trying not to use root as I'm aware it has potential for damage, its just this example seems to need some root changes).
sudo rpmbuild -ba testspec.spec --define "_topdir /tmp/"
So far it looks to be using the directory I expected, /tmp/rpmbuild
make[2]: Entering directory `/tmp/rpmbuild/BUILD/exim-4.80.1/build-Linux-x86_64/pdkim'
make[2]: `pdkim.a' is up to date.
make[2]: Leaving directory `/tmp/rpmbu
But then I see these errors...
/usr/lib/rpm/brp-compress: line 8: cd: /tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64: No such file or directory
+ /usr/lib/rpm/brp-strip
find: `/tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64': No such file or directory
+ /usr/lib/rpm/brp-strip-static-archive
find: `/tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64': No such file or directory
+ /usr/lib/rpm/brp-strip-comment-note
So it now seems to be looking in /tmp/BUILDROOT
I'm new to rpmbuild, and don't quite understand some of the process.
My test spec file is at...
%define myversion exim-4.80.1
##%define mybase %{getenv:HOME}
%define mybase /tmp
%define _topdir %{mybase}/rpmbuild
%define _tmppath %{mybase}/rpmbuild/tmp
%define name custom-exim
%define release 1
%define version 4.80.1
%define buildroot %{_topdir}/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: %{name}
Name: %{name}
Version: %{version}
Release: %{release}
Source0: ftp://exim.noris.de/exim/exim4/old/exim-4.80.1.tar.gz
License: GPLv1+
Group: Language
AutoReq: no
AutoProv: no
Requires: db4-devel pcre-devel libdb-devel libXt-devel libXaw-devel
%description
Custom Exim Build
%prep
#Do the following manually before building rpm
#mkdir -p /tmp/rpmbuild/BUILD /tmp/rpmbuild/SPECS /tmp/rpmbuild/SOURCES /tmp/rpmbuild/BUILDROOT /tmp/rpmbuild/RPMS /tmp/rpmbuild/SRPMS
#wget ftp://exim.noris.de/exim/exim4/old/exim-4.80.1.tar.gz -O /tmp/rpmbuild/SOURCES/exim-4.80.1.tar.gz
%setup -q -n %{myversion}
grep exim /etc/passwd || useradd -c "Exim" -d /var/spool/exim -m -s /bin/bash exim
%build
# exim needs to config changes before compiling, may do these first and repackage
cp %{mybase}/rpmbuild/BUILD/%{myversion}/src/EDITME %{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile
cp %{mybase}/rpmbuild/BUILD/%{myversion}/exim_monitor/EDITME %{mybase}/rpmbuild/BUILD/%{myversion}/Local/eximon.conf
sed -i -e 's/EXIM_USER=$/EXIM_USER=exim/g' "%{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile"
sed -i -e 's/LOOKUP_DNSDB=yes/#LOOKUP_DNSDB=yes/g' "%{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile"
make
%install
rm -rf $RPM_BUILD_ROOT
#%{__mkdir_p} '%{buildroot}%{_sbindir}'
make install
%clean
rm -rf $RPM_BUILD_ROOT
%post
%postun
%files
Why is it using /tmp/BUILDROOT literally, instead of /tmp/rpmbuild, and are there other obvious things I'm doing wrong ? I've looked at a lot of other tutorials on rpmbuild, but aren't very clear on best practices or what happens during each phase.
Since the buildroot parm is not passed to rpmbuild, the default path is being used by your spec file:
BuildRoot: %{buildroot}
Try adding the buildroot parm... Add buildroot /tmp/rpmbuild to --define
Or if using a makefile:
BUILD_TMP=/tmp/rpmbuild
TOP_DIR=/tmp
rpmbuild -bb
--buildroot $(BUILD_TMP)
--topdir $(TOP_DIR)
$(SPEC_DIR)/testspec.spec
In my case rpm-build was missing.
So sudo yum install rpm-build solved the problem. Or if you use puppet:
package { 'rpm-build':
ensure => latest,
}