configure

Hello I am running the following two commands as root

mylinux:/home/Download/guvcview-src-1.4.1 # ./configure
bash: ./configure: Permission denied
mylinux:/home/Download/guvcview-src-1.4.1 # sh ./configure

the first one fails while the second one works. Could you please help me identify the problem

I would like to thank you in advance

Best Regards
Alex

The file configure has no execute permissions. Something like this will fix it:

chmod 755 configure

Should you be doing compilation as root? Naughty. Tsk, tsk.

Hi
Never complie as root :frowning:

Here is a link to a spec file to build an rpm (save as guvcview.spec);
http://pastebin.com/fsSrtE25
There is a patch to add for the desktop entry (save as desktop.patch)
http://pastebin.com/4vnVhTTU
Download the latest source (1.4.1 as of today)

You will need to install all the files in the BuildRequires section of
the spec, libffmpeg-devel needs the packman repository added.

Now as your USER!! place all three files in /usr/src/packages/SOURCES/
directory and open a terminal and run the following command again as
your USER;


rpmbuild -ba guvcview.spec

You should then have built rpms in /usr/src/packages/SRPMS
and /usr/src/packages/RPMS/(arch), you can then install the one
manually from /usr/src/packages/RPMS/(arch) either via the sudo rpm -Uhv
or sudo zypper in commands.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 2 days 23:39, 3 users, load average: 0.21, 0.07, 0.04
GPU GeForce 8600 GTS Silent - Driver Version: 195.36.31

I would like to thank you for your help.
What might happen if you compile as roor?

I think configure has enough configure permissions
**-rw-rwxr-- **

After I run these commands
chmod + ./configure
ap@mylinux:~/Download/guvcview-src-1.4.1> ./configure
bash: ./configure: Permission denied

and afterwards

chmod 777 ./configure
ap@mylinux:~/Download/guvcview-src-1.4.1> ./configure
bash: ./configure: Permission denied

I would like to mention here that I have similar problems like these into a few scripts I also made. These are scripts that work fine in another opensuse computer I have but for some reason they do not work well to this one (getting permission problems all the time)

LAter on I will try to make this rpm and I will see what happens

I would like to thank you in advance
Best regards

Probably not very much in this case, but it’s good to develop good habits of not doing things as root unnecessarily. Besides if you configure as root, any files created will be owned as root and then you will have problems later on working as yourself in your own directory with those files.

I think configure has enough configure permissions
**-rw-rwxr-- **

After I run these commands
chmod + ./configure
ap@mylinux:~/Download/guvcview-src-1.4.1> ./configure
bash: ./configure: Permission denied

and afterwards

chmod 777 ./configure
ap@mylinux:~/Download/guvcview-src-1.4.1> ./configure
bash: ./configure: Permission denied

I would like to mention here that I have similar problems like these into a few scripts I also made. These are scripts that work fine in another opensuse computer I have but for some reason they do not work well to this one (getting permission problems all the time)

Is that directory by any chance on a different filesystem, NTFS or FAT, or CIFS perhaps? Or perhaps you mounted it from an external disk without execute permissions. Post the result of this command:

mount

/dev/sda5 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda7 on /home type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)

Thanks for your help.

it seems that I do not get the whole process. I downloaded the files as you told me but I am not sure where to put them exactly.

Also you mentioned that I need to install the package libffmpeg-devel but yast reports a conflict :frowning:

Why shouldn’t I try the ./configure, make, make all?

Best Regards
Aex

/dev/sda7 on /home type fuseblk (rw,noexec,nosuid,nodev,allow_other,default_permissions,blksize=4096)

fuseblk huh? You’ve got your home on a NTFS right? See that noexec? It means you can’t execute programs in this filesystem.

Take my advice, you’ll have much fewer hassles if you do your compiling on a native Linux filesystem. Try /usr/local/src as a place to put your source programs.

I have an example as to why you should not compile code as root. A few
years ago, a bug was introduced in the kernel make process that resulted
in /dev/null being deleted when the kernel was built as root. For
non-privileged users, the attempt failed silently, thus it was not even
seen, but for root users, the system could no longer boot!

Hi
Yes, packman has to install some of it’s own files, hence the conflict.
It should say it’s switch one or two to packman versions?

The three files need to be copied to /usr/src/packages/SOURCES
directory.

Sure you can use the manual method, you need to manually fix the
desktop file, fix the permissions, as your doing it as root user, I
suggest you backup any important data as I don’t know what may
happen…

Also if you don’t install the packman package, it will fail the
configure part…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 RC 1 (i586) Kernel 2.6.34-9-desktop
up 0:51, 2 users, load average: 0.04, 0.10, 0.08
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

I would like to thank every single one of you for your help

rpmbuild -ba guvcview.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Bidf8e

  • umask 022
  • cd /usr/src/packages/BUILD
  • cd /usr/src/packages/BUILD
  • rm -rf guvcview-src-1.4.1
  • /usr/bin/gzip -dc /usr/src/packages/SOURCES/guvcview-src-1.4.1.tar.gz
  • /bin/tar -xf -
  • STATUS=0
  • ‘’ 0 -ne 0 ‘]’
  • cd guvcview-src-1.4.1
  • /bin/chmod -Rf a+rX,u+w,g-w,o-w .
  • echo ‘Patch #0 (desktop.patch):’
    Patch #0 (desktop.patch):
  • /bin/cat /usr/src/packages/SOURCES/desktop.patch
  • /usr/bin/patch -s -p0 --fuzz=2
    patch unexpectedly ends in middle of line
    ’ find src -type f -exec chmod u=rw,go=r ‘{}’ ‘;
    find: missing argument to `-exec’
    error: Bad exit status from /var/tmp/rpm-tmp.Bidf8e (%prep)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Bidf8e (%prep)

Hi
If you open the desktop.patch with vi or gedit make sure the cursor is
on a newline after the last line, if not enter one and save. Or do you
have some extra text in the patch? It should only have 11 lines of text.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 3 days 19:41, 3 users, load average: 0.24, 0.44, 0.22
GPU GeForce 8600 GTS Silent - Driver Version: 195.36.31

Hi
Here is the build log from my test machine;
http://pastebin.com/yQJcdwSz


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.12-0.7-default
up 3 days 19:49, 3 users, load average: 0.61, 0.41, 0.25
GPU GeForce 8600 GTS Silent - Driver Version: 195.36.31

Thx again
Could you please tell me what is the fstab magic word that makes the ntfs permissions to exec scripts and programs I write?
Best Regards
Alex

I don’t know, I don’t use NTFS myself. As I already said, I wouldn’t recommend using NTFS for hosting development.