Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I got a VPS with RedHat AS 3 on it.
I want to compile and install programs from sources, but I didn't find any SRPM's for the specific program. So I tried compile directly from program's web-site downloaded sources, but it doesn't work.
uname states that mine is a i386 i686 arch, and the source supports it.
When I try to configure that is the output:
./configure
-bash: ./configure: /bin/sh: bad interpreter: Permission denied
but permissions are ok
So I tried:
/bin/sh configure
and that's work for a while then it stops:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
creating target.h - canonical system defines
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
After that configure and other file with execute permissions simply vanish.
Did I miss something?
Maybe it's a silly question but at the moment I can't understand why it doesn't work.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Some ideas.
What's the output of ' ls -la /bin/sh ' minus the '' of course?
I know you have limited use of posting weblinks but post what you can to a file you are working on.
ls -al /bin/sh
lrwxr-xr-x 1 root root 4 Mar 31 23:22 /bin/sh -> bash
I tried with some SRPM packet of another program and it works. But since I didn't find any SRPM's about this one I need I have to use the sources.
Any ideas?
Quote:
Originally Posted by Brian1
Some ideas.
What's the output of ' ls -la /bin/sh ' minus the '' of course?
I know you have limited use of posting weblinks but post what you can to a file you are working on.
where you change the second path to match that of the "configure" tool you're having trouble with.
Also please paste the line starting with #! at the top of "configure".
By "VPS" do you mean "Virtual Private Server", ie some kind of virtualization technology?
Maybe you need special compilation options for such a system. Not sure though, since I've never used one myself.
I changed owner and group to root and it compile for a while then stops for errors.
But I compiled program from source before and I've never had to change owner and group...
However this is not the point. The actual problem is that it doesn't compile!
Even before changing permission i managed to start compilig by running:
/bin/sh configure.
But it stops compiling.
Yes VPS = Virtual Private Server. I don't know if there are option to compile under that system.
But does a source RPM know whether or not the system is a VPS or a "real" server, and "normal" source code not designed specifically for this system doesn't know that at all?
Actually is a friend of mine's problem. He asked me to solve this problem, I'm an average linux user, my distro is Slack and I've never had problems compiling from source, at least some config paramethers or missing libraries, but not:
"checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details."
Here there is the config.log file:
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by -bash, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ -bash
## --------- ##
## Platform. ##
## --------- ##
hostname = 213-215-227-36.vps.dnshosting.it
uname -m = i686
uname -r = 2.6.8-022stab070.9-enterprise
uname -s = Linux
uname -v = #1 SMP Thu Apr 20 10:48:12 MSD 2006
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: //sbin
PATH: //bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /root/bin
## ----------- ##
## Core tests. ##
## ----------- ##
-bash:1531: checking build system type
-bash:1549: result: i686-pc-linux-gnu
-bash:1557: checking host system type
-bash:1571: result: i686-pc-linux-gnu
-bash:1579: checking target system type
-bash:1593: result: i686-pc-linux-gnu
-bash:1664: result: creating target.h - canonical system defines
-bash:1808: checking for a BSD-compatible install
-bash:1863: result: /usr/bin/install -c
-bash:1874: checking whether build environment is sane
-bash:1917: result: yes
-bash:1941: WARNING: `missing' script is too old or missing
-bash:1982: checking for gawk
-bash:1998: found //bin/gawk
-bash:2008: result: gawk
-bash:2018: checking whether make sets $(MAKE)
-bash:2038: result: yes
-bash:2219: checking for gawk
-bash:2245: result: gawk
-bash:2301: checking for gcc
-bash:2317: found /usr/bin/gcc
-bash:2327: result: gcc
-bash:2571: checking for C compiler version
-bash:2574: gcc --version </dev/null >&5
gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-bash:2577: $? = 0
-bash:2579: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.5/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
-bash:2582: $? = 0
-bash:2584: gcc -V </dev/null >&5
gcc: `-V' option must have argument
-bash:2587: $? = 1
-bash:2610: checking for C compiler default output file name
-bash:2613: gcc conftest.c >&5
-bash:2616: $? = 0
-bash:2662: result: a.out
-bash:2667: checking whether the C compiler works
-bash:2673: ./a.out
-bash: ./a.out: Permission denied
-bash:2676: $? = 126
-bash:2685: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-pc-linux-gnu
ac_cv_target_alias=i686-pc-linux-gnu
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='aclocal-1.9'
ADDITIONAL_LIBS=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='tar'
AUTOCONF='autoconf'
AUTOHEADER='autoheader'
AUTOMAKE='automake-1.9'
AWK='gawk'
BUILD_CLAMD_FALSE=''
BUILD_CLAMD_TRUE=''
CC='gcc'
CCDEPMODE=''
CFGDIR=''
CFLAGS=''
CLAMAVGROUP=''
CLAMAVUSER=''
CLAMAV_MILTER_LIBS=''
CLAMD_LIBS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DBDIR=''
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FRESHCLAM_LIBS=''
GETENT=''
HAVE_MILTER_FALSE=''
HAVE_MILTER_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBCLAMAV_LIBS=''
LIBCLAMAV_VERSION='1:17:0'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO='makeinfo'
OBJEXT=''
PACKAGE='clamav'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
TH_SAFE=''
VERSION='0.88.2'
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${prefix}/share'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/tmp/clamav-0.88.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sendmailprog=''
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='i686-pc-linux-gnu'
target_alias=''
target_cpu='i686'
target_os='linux-gnu'
target_vendor='pc'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "clamav"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.88.2"
-bash: exit 1
That's it. I changed owner and group at every file in the program's directory.
Thanx again for help, hope not boring you.
Quote:
Originally Posted by timmeke
Try
Code:
ls -la /bin/bash
ls -la /path/to/configure
where you change the second path to match that of the "configure" tool you're having trouble with.
Also please paste the line starting with #! at the top of "configure".
By "VPS" do you mean "Virtual Private Server", ie some kind of virtualization technology?
Maybe you need special compilation options for such a system. Not sure though, since I've never used one myself.
-bash:2613: gcc conftest.c >&5
-bash:2616: $? = 0
-bash:2662: result: a.out
-bash:2667: checking whether the C compiler works
-bash:2673: ./a.out
-bash: ./a.out: Permission denied
So, gcc works just fine and it produces an "a.out" file. Only problem seems that "a.out" won't run.
Compiling as root should make it run, at least if it has execute (x) permission.
Can you do an "ls -l" on the a.out file (if it wasn't thrown away)?
a.out doesn't exist!
For sake of knowledge I tried to compile another program and it gave me the same error, but I found the same program's version as SRPM e it compile! (and install as well)
I diff the two configure and are the same! No differences!
How can you explain that?
Next step I will try to autoconf-automake my program's sources to test if doing so it works. I will see this evening 'cause now I'm at work and for security reasons door are closed. (my friend has run commands above, I gave him instructions by phone!)
Quote:
Originally Posted by timmeke
So, gcc works just fine and it produces an "a.out" file. Only problem seems that "a.out" won't run.
Compiling as root should make it run, at least if it has execute (x) permission.
Can you do an "ls -l" on the a.out file (if it wasn't thrown away)?
Now it works, the problem is that I was compiling sources on a partition with noexec set (according to /etc/mtab)!
Sorry, I thought it was something stupid!
Thanx again!
Quote:
Originally Posted by teoz
umask -S
u=rwx,g=rx,o=rx
umask
0022
a.out doesn't exist!
For sake of knowledge I tried to compile another program and it gave me the same error, but I found the same program's version as SRPM e it compile! (and install as well)
I diff the two configure and are the same! No differences!
How can you explain that?
Next step I will try to autoconf-automake my program's sources to test if doing so it works. I will see this evening 'cause now I'm at work and for security reasons door are closed. (my friend has run commands above, I gave him instructions by phone!)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.