Hi am trying to a build shell script in centos 7.5 but am stopped due to the following error
ERROR:
[root#localhost unimrcp-1.5.0]# ./bootstrap
+ libtoolize --force --automake --copy
+ aclocal -I build/acmacros
+ automake --foreign --add-missing --copy
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
[-l dir] [--localdir=dir] [--version] [template-file]
automake: error: autoconf failed with exit status: 1
+ autoconf
autoconf: configure.in: No such file or directory
+ rm -rf autom4te.cache
and the following is the shell script i tried to execute.
bootstrap.sh
#! /bin/sh
case `uname` in
Darwin) libtoolize=glibtoolize ;;
*) libtoolize=libtoolize ;;
esac
set -x
$libtoolize --force --automake --copy
aclocal -I build/acmacros
automake --foreign --add-missing --copy
autoconf
rm -rf autom4te.cache
Can any one help me to solve this problem?
Thank you :)
Your script is failing at the autoconf step.
From man autoconf:
Synopsis
autoconf [OPTION]... [TEMPLATE-FILE]
Description
Generate a configuration script from a TEMPLATE-FILE if given, or
'configure.ac' if present, or else 'configure.in'. Output is sent to
the standard output if TEMPLATE-FILE is given, else into 'configure'.
As you can see autoconf is either expecting a TEMPLATE-FILE or it is looking for configure.ac or configure.in.
Since neither is given, your script is failing.
Related
I'm trying to build my first RPM, and I keep getting this error:
/var/tmp/rpm-tmp.6K3TRj: line 33: $'\r': command not found
error: Bad exit status from /var/tmp/rpm-tmp.6K3TRj (%prep)
I have seen a few people ask about this error, but I cant find a solution that I haven't already tried.
My spec file looks like this:
Name: test
Version: 0.0.2
Release: 1%{?dist}
Summary: test
BuildArch: noarch
License: GPL
Source0: %{name}-%{version}.tar.gz
Requires: bash
%description
test
%prep
%setup -q
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp %{name}.sh $RPM_BUILD_ROOT/%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_bindir}/%{name}.sh
I get this error after running the command
rpmbuild -bb ~/rpmbuild/SPECS/test.spec
I'm really new to this, so if anyone could help figure out what I need to change to get this to run, I'd be so grateful.
the complete output I get is:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.6K3TRj
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf api-controller-0.0.2
+ /usr/bin/tar -xf /root/rpmbuild/SOURCES/test-0.0.2.tar.gz
+ cd test-0.0.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ $'\r'
/var/tmp/rpm-tmp.6K3TRj: line 33: $'\r': command not found
error: Bad exit status from /var/tmp/rpm-tmp.6K3TRj (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.6K3TRj (%prep)
Any time you see random \r complaints in Linux/Unix, it means you have a Windows-formatted file. Run dos2unix on your specfile.
See Wikipedia.
I am trying to build the pip package for a certain 2.x version detailed here.
After running:
bazel build --config=dbg //tensorflow/tools/pip_package:build_pip_package --verbose_failures
I get the following message:
error executing shell command:
/bin/bash -c bazel-out/k8fafe98f9cd48032f8d6a9732902b210aba3b30f85849d3455fe9d9fb327/bin/tensorflow/tools/git/gen_git_source --generate "$#" --git_tag_led (Exit 127): bash failed: error executing command
(cd /home/john/.cache/bazel/_bazel_john/d320ed9b7367c72a32244d7a65335602/execroot/org_tensorflow && \
exec env - \
PATH=/home/john/.cache/bazelisk/downloads/bazelbuild/bazel-3.1.0-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbigames:/usr/local/games:/snap/bin \
/bin/bash -c 'bazel-out/k8-opt-exec-50AE0418-ST-e0f78fafe98f9cd48032f8d6a9732902b210aba3b30f85849d3455fe9d9fb327/bin/tensorfe --generate "$#" --git_tag_override=${GIT_TAG_OVERRIDE:-}' '' external/local_config_git/gen/spec.json external/local_config_gconfig_git/gen/branch_ref bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/util/version_info.cc)
Execution platform: #local_execution_config_platform//:platform
/usr/bin/env: 'python': No such file or directory
and indeed version_info.cc is not generated...
the basel version is 3.1.0
Does anyone have any ideas?
It could be either because python is not installed, or it is not linked to /usr/bin/python. The latter can be fixed by sudo ln -s /usr/bin/python3 /usr/bin/python.
I want to build a rpm package from a spec file(hello-world.spec).The command and error output are given below
Command1:
rpmbuild -ba hello-world.spec
ErrorOutput1:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.z4GoQn
+ umask 022
+ cd /root/rpmbuild/BUILD
+
: not foundm-tmp.z4GoQn: 28: /var/tmp/rpm-tmp.z4GoQn:
error: Bad exit status from /var/tmp/rpm-tmp.z4GoQn (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.z4GoQn (%prep)
Content of my spec file is
Name: hello-world
Version: 1
Release: 1
Summary: Most simple RPM package
License: FIXME
%description
This is my first RPM package, which does nothing.
%prep
# we have no source, so nothing here
%build
cat > hello-world.sh <<EOF
#!/usr/bin/bash
echo Hello world
EOF
%install
mkdir -p %{buildroot}/usr/bin/
install -m 755 hello-world.sh %{buildroot}/usr/bin/hello-world.sh
%files
/usr/bin/hello-world.sh
%changelog
# let's skip this for now
My System/software details are
OS: Ubuntu 16.04
RPM version:4.12.0.1
The list of contents in rpmbuild folder is
Command2:
:~/rpmbuild# ls
Output2:
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
Can anybody help on this issue?
Check how your files is being generated. If you are passing files from windows to Linux, usually, there are different EOL for the files. We had a similar issue, I recommend you to change all the files to Unix format. I'm sharing with you how to reproduce your issue, if you edit that file in a Linux environment, like "nano", the problem disappears.
On this chapter http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html
root#host# chroot "$LFS" /usr/bin/env -i \
> HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
> PATH=/bin:/usr/bin:/sbin:/usr/sbin \
> /bin/bash --login
root:/# cd sources/linux-3.2.6
root:/sources/linux-3.2.6# make mrproper
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config
root:/sources/linux-3.2.6# make menuconfig
HOSTCC scripts/basic/fixdep
gcc: error trying to exec 'as': execvp: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
Why am i gettting such error?
Updating
Got the answer, it is binutils installation related, may be corrupted installation of binutis.
http://www.linuxquestions.org/questions/linux-software-2/gcc-error-trying-to-exec-%27as%27-execvp-no-such-file-or-directory-906750/
`gcc: error trying to exec 'cc1': execvp: No such file or directory` When compile program with `popen` in php
You need to install GNU Binutils package.
http://www.gnu.org/software/binutils/
I am building an rpm please let me know where i am going wrong,
My spec file is rpms.spec and the contents are:
Summary: GNU indent
Name: rpms
Version: 1
Release: 1
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: Development/Tools
%description
The GNU indent program reformats C code to any of a variety of
formatting standards, or you can define your own.
%prep
%setup -q
%build
./configure
make
%install
make install
%files
%defattr(-,root,root)
/usr/local/bin/indent
%doc /usr/local/info/indent.info
%doc %attr(0444,root,root) /usr/local/man/man1/indent.1
%doc COPYING AUTHORS README NEWS
I have copied the tar file to /usr/src/redhat/SOURCES/ also
and then when i do rpmbuild -ba rpms.spec I get the following error
rpmbuild -ba rpms.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.87218
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf rpms-1
+ /bin/gzip -dc /usr/src/redhat/SOURCES/rpms-1.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd rpms-1 /var/tmp/rpm-tmp.87218: line 35: cd: rpms-1: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.87218 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.87218 (%prep)
There is no directory as rpms-1.I tried creating the directory in BUILd directory it didnt work.
You have set Name to rpms and version to 1
rpmbuild will therefore assume that unpacking rpms-1.tar.gz results in a directory named rpms-1 in which is should step into to do the build.
if you want to override that, change the %setup to
%setup -n yourdir
where yourdir is whatever directory your sources are packaged in, inside your tar.gz file