LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-27-2018, 04:46 AM   #1
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 14.2 64bit
Posts: 112

Rep: Reputation: 20
libtoolize - behavior under "/tmp" subdirectories


Hi all!
I'm trying to rebuild a package (liblrdf), that requires to run an autogen.sh script. In that "libtoolize --force" command is called.

libtoolize should create a symlink called "ltmain.sh" and it should put it in the current directory ".".
But actually that file is put in "parent" directory "..", when the parent dir is "/tmp".
Moreover it is put in the "granparent" ("../..") dir if it is "/tmp".
And finally it is put in the current dir in other cases I tried.
I'll show you an examble below:
Code:
:/tmp$ mkdir libtoolize-test
:/tmp$ cd libtoolize-test/
:/tmp/libtoolize-test$ libtoolize --force
libtoolize: putting auxiliary files in '..'.
libtoolize: linking file '../ltmain.sh'
Code:
:/tmp/libtoolize-test$ mkdir subdir
:/tmp/libtoolize-test$ cd subdir
:/tmp/libtoolize-test/subdir$ libtoolize --force
libtoolize: putting auxiliary files in '../..'.
libtoolize: linking file '../../ltmain.sh'
Code:
:/tmp/libtoolize-test/subdir$ mkdir subdir2
:/tmp/libtoolize-test/subdir$ cd subdir2/
:/tmp/libtoolize-test/subdir/subdir2$ libtoolize --force
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
Code:
:/tmp/libtoolize-test/subdir/subdir2$ cd
:~$ mkdir libtoolize-test
:~$ cd libtoolize-test/
:~/libtoolize-test$ libtoolize --force
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
:~/libtoolize-test$ ls -l
totale 0
lrwxrwxrwx 1 joe users 38 giu 27 10:25 ltmain.sh -> /usr/share/libtool/build-aux/ltmain.sh
What do you think about this strange behavior?
Could you confirm if on your systems libtoolize does the same?

I'm on slack 14.2 with autoconf and libtool packages as follow:
Code:
$ ls /var/log/packages/|grep 'autoconf\|libtool'
autoconf-2.69-noarch-1
autoconf-archive-2018.03.13-noarch-1_SBo
libtool-2.4.6-x86_64-5_slack14.2
libtool-compat32-2.4.6-x86_64-5_slack14.2compat32
Thanks all in advance!
Bye
 
Old 06-27-2018, 09:10 AM   #2
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,472

Rep: Reputation: Disabled
I ran into something like this the other day, the issue was that it was finding an 'install.sh' test script in /tmp/ and decided that was a good place to put ltmain.sh...

Removing the the test script that was confusing libtoolize (autoreconf) worked as well as applying a patch like this, in my example it is for mesa-demos.
Code:
diff --git a/configure.ac b/configure.ac
index 0b5e9a76..2c2430d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@ AC_INIT([mesa-demos], [8.4.0],
     [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa&component=Demos])
 AC_CANONICAL_HOST
 
+AC_CONFIG_AUX_DIR([.])
 AM_INIT_AUTOMAKE([dist-bzip2])
 
 dnl Check for progs
I next attempted your example.
Code:
$ mkdir libtoolize-test
=$ cd libtoolize-test/
=$ libtoolize --force
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
And again with my example from above.
Code:
$ mkdir libtoolize-test
$ cd libtoolize-test/
$ touch ../install.sh
$ libtoolize --force
libtoolize: putting auxiliary files in '..'.
libtoolize: linking file '../ltmain.sh'
 
Old 06-27-2018, 09:37 AM   #3
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 14.2 64bit
Posts: 112

Original Poster
Rep: Reputation: 20
Uhmmm...
It seem you are right!
Well... strange behavior eventually...

If /tmp dir contains a file called install.sh, libtoolize stops working properly.

It seems a libtoolize bug to me, isn't it?

Look at my /tmp dir:
Code:
less /tmp/install.sh 

#!/usr/bin/env bash

cd "$(dirname "$0")/app"

which node 2>/dev/null
isNode=$?
echo NodeJS status = $isNode

if [ $isNode -eq 0 ]; then
  node -e "process.exit(Number(process.version.substr(1).split('.')[0]) > 5 ? 0 : 1)"
  isNode=$?
fi
if [ $isNode -eq 0 ]; then
  echo "Installer is using your system NodeJS."
  node install.js `which node` $1
else
  MACHINE_TYPE=`uname -m`
  echo "Installer is using the attached NodeJS"
  if [ ${MACHINE_TYPE} == 'x86_64' ]; then
    ../node/x64/node install.js --add_node $1
  else
    ../node/x86/node install.js --add_node $1
  fi
fi
I don't know what that script is, but I think it can be removed without any problem, likely it was an old "residue" of something unimportant stuff.

Anyway, your hint solved!
That issue prevented sbopkg to work properly on packages build, cause it wroks in /tmp/SBo/$PACKAGE_NAME...
Now after "rm /tmp/install.sh", It works properly.
Code:
+++++++++++++++++++++++++++++++++++++++++++
SUMMARY LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install

belle-sip:
  MD5SUM check for belle-sip-1.6.3.tar.gz ... OK
  MD5SUM check for antlr-3.4-complete.jar ... OK
  Building package belle-sip-1.6.3-x86_64-1_SBo.tgz ... OK
  Installing package belle-sip-1.6.3-x86_64-1_SBo.tgz ... OK

+++++++++++++++++++++++++++++++++++++++++++

###########################################
          Queue process complete!
###########################################
I obtained errors with both "belle-sip" and "liblrdf" packages rebuilding.
For them both, I wrote two patches. The same you reported above: defining "AC_CONFIG_AUX_DIR([.])" in configure.ac.

I don't know how do you figure that was the issue, anyway thank you very much.
Great answer! again thanks!
 
Old 06-27-2018, 09:46 AM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,472

Rep: Reputation: Disabled
I'm not sure this is a libtoolize bug so much as a "feature". When I ran into it I spent a bit of time searching online until I found another project that ran into this and applied the "AC_CONFIG_AUX_DIR([.])" fix to work around it, but they did not seem to ever find out why it happened. Given that I could only reproduce it in /tmp/ and in one install it made sense to try cleaning up '/tmp/' which of course worked too.

Looking at libtoolize, it seems this is part of the code responsible.
Code:
    test -z "$aux_dir" && {
      # Try to intuit aux_dir using the same heuristic as Autoconf.
      for _G_dir in . .. ../..; do
        if test -f "$_G_dir/install-sh" || test -f "$_G_dir/install.sh"
        then
          aux_dir=$_G_dir
          break
        fi
      done
    }
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
What's the difference between "mv dir/* /tmp" and "find dir/* -print0 | xargs" ? thomas2004ch Linux - Software 8 04-19-2012 11:43 AM
"No space left on device" error on /tmp. How to increase space on /tmp? anilp Linux - Newbie 12 01-24-2011 02:40 PM
"libtoolize not found" what is going wrong Matz Linux - General 3 01-11-2007 11:17 AM
"rm -rf /tmp", now Evolution shows "(no folder displayed" Ed-MtnBiker Linux - Software 7 04-10-2006 05:05 PM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration