LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-15-2005, 01:42 PM   #1
Ljubomir
LQ Newbie
 
Registered: May 2004
Location: Novi Sad
Posts: 6

Rep: Reputation: 0
no longer able to compile


Hi all,

For unknown reasons I am no longer able to compile programs. When I run
Code:
./configure
script from _ANY_ project i get only:
Code:
bash: ./configure: /bin/sh: bad interpreter: Permission denied
So I run it through:
Code:
sh ./configure
but it ends at:
Code:
checking whether the C compiler works... configure: error: cannot run C compiled programs.
I've checked config.log, and found:
Code:
configure:2823: checking whether the C compiler works
configure:2829: ./a.out
./configure: line 2830: ./a.out: Permission denied
configure:2832: $? = 126
configure:2841: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Same is when running as root. Any ideas?

suse 9.2 prof
gcc version 3.3.4 (pre 3.3.5 20040809)

I've compiled many apps on this machine just few weeks ago...

Ljubomir
 
Old 03-15-2005, 02:23 PM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
try entering this into foo.c
Code:
int main () { }
then run:
Code:
$ gcc foo.c -o foo
$ ./foo
$ echo $?
if an error happens, post the output; also, do post the output of echo $?
 
Old 03-16-2005, 09:04 AM   #3
Ljubomir
LQ Newbie
 
Registered: May 2004
Location: Novi Sad
Posts: 6

Original Poster
Rep: Reputation: 0
Code:
ljubomir@Fidel:~> gcc foo.c -o foo
ljubomir@Fidel:~> ./foo
ljubomir@Fidel:~> echo $?
16
ljubomir@Fidel:~>
No output, just echo returns code 16.
 
Old 03-16-2005, 09:12 AM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
that's weird. Post
$ gcc --version
 
Old 03-17-2005, 02:37 AM   #5
Ljubomir
LQ Newbie
 
Registered: May 2004
Location: Novi Sad
Posts: 6

Original Poster
Rep: Reputation: 0
Code:
ljubomir@Fidel:~> gcc --version
gcc (GCC) 3.3.4 (pre 3.3.5 20040809)
Copyright (C) 2003 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.

ljubomir@Fidel:~>
Do you think updating gcc might help?
 
Old 03-29-2005, 02:58 AM   #6
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
it might. Also worth updating: the C library (`glibc[something]', iirc). I expected `echo $?' to return `0'; why it doesn't fails me, but I think it might be the C library. Post the output of `gcc -S foo.c && cat foo.s'

Also, it struck me: why is /bin/sh a bad interpreter? Not present? bad chmod?
 
Old 03-29-2005, 03:04 AM   #7
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
are you using multiple partitions?

I have this problem myself if I try to compile out of my "storage" partition. If I move the source back into my root partition, problem goes away. I've never really investigated it so I'm not sure what it is, but ( in my case) it must be something with how I'm mounting my storage partition

edit: My symptoms above were on multiple distro's
 
Old 04-02-2005, 07:36 AM   #8
neal.h
LQ Newbie
 
Registered: Apr 2005
Distribution: Suse 9.2 prof & Solaris 9
Posts: 1

Rep: Reputation: 0
This problem can be caused by trying to execute code residing on a partition which has been mounted with 'noexec' set.
To check issue the mount command and check for the 'noexec' option against the partition your code is on :
e.g. etlnhl@Roland:~> mount
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda1 on /Data_120_C type reiserfs (rw,noexec,acl,user_xattr)

To fix, unmount the partition - umount /Data_120_C (make sure that nothing is using the partition i.e check that no shell or filemanager is currently open at a directory on that partition) and then remount it with the noexec option
e.g. etlnhl@Roland:~> mount /dev/hda1 /Data_120_C -o noexec

If you get an error such as the command complaining that you do not have permission or are not root then you will either have to mount the partition as root or change the /etc/fstab entry to include the option 'users'
Regardless you will need to edit your /etc/fstab file to create a permanent fix.

hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can no longer su root slackaddict Linux - General 10 10-20-2005 06:03 PM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
USB Mouse/Sound no longer work after kernel compile, MDK 10, 2.6.3 Kramer Linux - Hardware 8 03-25-2004 11:49 PM
May no longer be able to take PayPal jeremy LQ Suggestions & Feedback 16 09-13-2003 01:16 AM
I can no longer see anything...! Thymox Linux - Networking 8 11-19-2002 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration