LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   trouble running amaya slackbuild (http://www.linuxquestions.org/questions/slackware-14/trouble-running-amaya-slackbuild-4175425725/)

Z038 09-05-2012 03:44 AM

trouble running amaya slackbuild
 
I got an error running the amaya slackbuild script from slackbuilds.org.

Here are the last few lines before the error:

Code:

Amaya11.3.1/freetype/src/autofit/afhints.h
Amaya11.3.1/freetype/vms_make.com
Amaya11.3.1/freetype/autogen.sh
patching file src/gtk/gsockgtk.cpp
patching file Amaya/thotlib/base/platform.c
patching file Amaya/amaya/HTMLedit.c
./amaya.SlackBuild: line 83: ../configure: Permission denied

In the amaya.SlackBuild script, the area where the error occurs:

Code:

mkdir -p Amaya/build
cd Amaya/build
  CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS" \
  ../configure \
    --prefix=/opt/ \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --mandir=/usr/man \
    --docdir=/usr/doc/$PRGNAM-$VERSION \
    --with-gl \
    --with-wxsrcdir=../../wxWidgets/ \
    --enable-system-raptor \
    --build=$ARCH-slackware-linux
  make wxwidgets || exit 1
  make all || exit 1
  make install DESTDIR=$PKG || exit 1
cd ..

I am running this as root. Any idea what would cause the permission eror?

sorinm 09-05-2012 04:04 AM

chmod +x amaya.SlackBuild

414N 09-05-2012 04:09 AM

The configure script inside the source tarball probably lacks the executable permission.
Try prepending it with sh to force the shell to read it:
Code:

sh ../configure [...]

Z038 09-05-2012 05:08 AM

Quote:

Originally Posted by sorinm (Post 4773081)
chmod +x amaya.SlackBuild

The script already has execute permission bit turned on.

Quote:

Originally Posted by 414N (Post 4773087)
The configure script inside the source tarball probably lacks the executable permission.
Try prepending it with sh to force the shell to read it:
Code:

sh ../configure [...]

That worked a little. It got further before it died.

Code:

Amaya11.3.1/freetype/src/autofit/afglobal.h
Amaya11.3.1/freetype/src/autofit/afhints.h
Amaya11.3.1/freetype/vms_make.com
Amaya11.3.1/freetype/autogen.sh
patching file src/gtk/gsockgtk.cpp
patching file Amaya/thotlib/base/platform.c
patching file Amaya/amaya/HTMLedit.c
checking build system type... i486-slackware-linux-gnu
checking host system type... i486-slackware-linux-gnu
checking target system type... i486-slackware-linux-gnu
checking whether make sets $(MAKE)... yes
checking for bison... bison -y
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.

Here is the relevant section from config.log

Code:

configure:2400: gcc -v >&5
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.5.2/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i486-slackware-linux/4.5.2/lto-wrapper
Target: i486-slackware-linux
Configured with: ../gcc-4.5.2/configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-boo
tstrap --enable-languages=ada,c,c++,fortran,java,objc,lto --enable-threads=posix --enable-checking=release --with-system-zlib --with-pytho
n-dir=/lib/python2.6/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbo
se --with-arch=i486 --target=i486-slackware-linux --build=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.5.2 (GCC)
configure:2403: $? = 0
configure:2410: gcc -V >&5
gcc: '-V' option must have argument
configure:2413: $? = 1
configure:2436: checking for C compiler default output file name
configure:2463: gcc -O2 -march=i486 -mtune=i686  conftest.c  >&5
configure:2466: $? = 0
configure:2504: result: a.out
configure:2521: checking whether the C compiler works
configure:2531: ./a.out
../configure: line 2532: ./a.out: Permission denied

configure:2534: $? = 126
configure:2543: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


I wonder if this is being caused by my recent change to how /tmp is mounted? That's where the SBo directory is located. I added this line to fstab and rebooted right before running this SlackBuild.

Code:

tmpfs            /tmp            tmpfs      defaults,noexec,nosuid,mode=1777        0  0
I believe I'll have to reboot to remove the noexec and nosuid.

In the meantime, I changed the TMP and OUTPUT directories in the SlackBuild script to point to another directory instead of to /tmp, and that worked. So it does seem that either the noexec or nosuid or the fact that I added /tmp to fstab (it wasn't there before) caused the problem.

Thank you all for your help.

sorinm 09-05-2012 05:17 AM

You don`t have glibc installed.

Z038 09-05-2012 05:22 AM

glibc is installed. See my previous post. The problem must be related to my addition of /tmp to fstab. I got it to work by changing the TMP and OUTPUT directories in the SlackBuild to point them outside of /tmp.

Code:

i@am:/var/log/packages$ ls -al glibc*
-rw-r--r-- 1 root root 316709 Sep  4 18:07 glibc-2.13-i486-6_slack13.37
-rw-r--r-- 1 root root 228163 Sep  4 18:08 glibc-i18n-2.13-i486-6_slack13.37
-rw-r--r-- 1 root root  1015 Sep  4 18:08 glibc-profile-2.13-i486-6_slack13.37
-rw-r--r-- 1 root root  7827 Sep  4 18:06 glibc-solibs-2.13-i486-6_slack13.37
-rw-r--r-- 1 root root  69769 Sep  4 18:08 glibc-zoneinfo-2.13-noarch-6_slack13.37


414N 09-05-2012 06:29 AM

Quote:

Originally Posted by Z038 (Post 4773140)
I wonder if this is being caused by my recent change to how /tmp is mounted? That's where the SBo directory is located. I added this line to fstab and rebooted right before running this SlackBuild.

Code:

tmpfs            /tmp            tmpfs      defaults,noexec,nosuid,mode=1777        0  0
I believe I'll have to reboot to remove the noexec and nosuid.

In the meantime, I changed the TMP and OUTPUT directories in the SlackBuild script to point to another directory instead of to /tmp, and that worked. So it does seem that either the noexec or nosuid or the fact that I added /tmp to fstab (it wasn't there before) caused the problem.

Thank you all for your help.

There's little to wonder about, you denied executable permissions under /tmp...

Z038 09-05-2012 05:34 PM

That must be it. The configure file was copied to a directory under /tmp, then the SlackBuild attempted to execute it there.

I've come across a number of recommendations for giving /tmp the noexec attribute, but I think it will cause me more problems than it solves, so I'm going to take it back off. I could avoid using /tmp for SlackBuilds, but there may be other things that use it for executables.


All times are GMT -5. The time now is 11:45 AM.