LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 09-02-2004, 06:35 AM   #1
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
configure problem while building qt-x11-free-3.3.3 (BLFS)


Hi all;

I have run into a small problem while trying to build qt on cvs-version of BLFS (qt-x11-free-3.3.3)
I suppose this is not only related to LFS so I post it here.

the book says to configure qt like this (just the configure stuff here...)

bash
export QTDIR=$PWD &&
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
export PATH=$PWD/bin:$PATH &&
./configure -prefix /opt/qt-3.3.3 -qt-gif -system-libpng \
-system-libmng -system-zlib -system-libjpeg -no-exceptions \
-thread -plugin-imgfmt-png

--> enter a subshell to isolate environment changes made here and then run the configure-script...

when I do this, I get the folowing error:

You don't seem to have 'make' or 'gmake' in your PATH.
Cannot proceed.

the code in the configure script, which causes this error, is here:


# find a make command
MAKE=
for mk in gmake make; do
if $WHICH $mk >/dev/null 2>&1; then
MAKE=`$WHICH $mk`
break
fi
done
if [ -z "$MAKE" ]; then
echo "You don't seem to have 'make' or 'gmake' in your PATH."
echo "Cannot proceed."
exit 1
fi


I got rid of this error by commenting out all those lines except the first one - which I changed to:


MAKE=/usr/bin/make


So I effectively disabled the search routine in the configure script and gave the location of my make



My question is:

is there something wrong with the configure-script, because it does not find my "make"
or could it be my fault - some misconfiguration of bash or something... - so that the script must fail for me?
I'm not good at scripting so I can't figure out if the configure script should work or if it is the script, which is wrong...
 
Old 09-02-2004, 09:18 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 65
Try this:
Code:
echo $PATH
If it lists /usr/bin in its output, then something is wrong.

The PATH environment variable contains the possible locations of the directories containing executable files. This script tries to find make by using the “which” command, that looks through each of the directories in $PATH.

If /usr/bin/ isn't on your path, then your system's configuration is likely to be quite broken but it would explain why it didn't find it. Also, try running
Code:
which
and seeing if you actually have which installed; if not, then the configure script won't work anyway.

Hope that helps,

— Robert J. Lee
 
Old 09-02-2004, 01:48 PM   #3
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Original Poster
Rep: Reputation: 54
Thanks for answering...

of course I have checked my $PATH - everything is o.k. with that

(since I have built the whole LFS-system and a lot of BLFS so far without problems, I'm quite sure that my setup is o.k.)

I also have which installed and if I do "which make" on the command-line it gives the proper result...

Jonathan:~$ which make
/usr/bin/make

that is why I think that the script is broken somehow.

The script does this - I think:

$WHICH $mk >/dev/null 2>&1

this expands to: which make >/dev/null 2>&1

if I do this on command-line, I get nothing - as is to be expected, since all output is directed to /dev/null and in addition to that any errors that command might give are suppressed - this cannot work - I think

But it is in the configure script and it is supposed to find the location of make (or gmake) and then use this value in the makefiles

Can this code in the configure script even work - for this purpose, that is...?

Last edited by jomen; 09-02-2004 at 01:51 PM.
 
Old 09-02-2004, 02:06 PM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 349

Rep: Reputation: 30
The instructions given in the book are correct, I installed QT-3.3.3 only a few days ago without error, It would pay to check your environment setup again.

Pay particular attention to bash startup files section of the book.

Mad.

Last edited by madluther; 09-02-2004 at 02:09 PM.
 
Old 09-02-2004, 03:46 PM   #5
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Original Poster
Rep: Reputation: 54
issue solved! here is the explanation - and another question...

I did not doubt the instructions given in the book - just wondering how this could happen...

I was so sure that I have done everything right - I even did more than that and read the man-page for which...
(I installed the "which" program and not the script)

the man-page states this:


EXAMPLE
The recommended way to use this utility is by adding an alias (C shell) or shell function (Bourne shell) for
which like the following:

[ba]sh:

which ()
{
(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}
export -f which

[t]csh:

alias which Žalias | /usr/bin/which --tty-only --read-alias --show-dot --show-tildeŽ

This will print the readable ~/ and ./ when starting which from your prompt, while still printing the full
path when used from a script:

> which q2
~/bin/q2
> echo `which q2`
/home/carlo/bin/q2



So I added the shell function to /etc/profile and everything seemed o.k. with that - until I tried to build qt...

I just commented out this function - and configuring qt works now as it should!

Thanks for insisting on checking my setup - but why does the man page for "which" recommend this if it obviously breaks some scripts?

Since we are at it (BLFS-wise) - I noticed as a quite annoying feature of the provided bash-startup files, that my bash-history is not there as I'm used to - it only gives me the last commands of the current session for a terminal - not all the last commands ever typed in - as I would like it...
Everytime I log out and back in - my history seems completely empty - but /root/.bash_history of course contains all commands ever typed - they are not available though by pressing "UP-ARROW" or "DOWN-ARROW"

This may only be true for root - I have not yet set up another (ordinary) user - since I'm still building the system and not yet using it...
Has it something to do with this line:

export HISTIGNORE="&:[bf]g:exit"

which is in /etc/profile ?

Where would I have to look to change that behaviour?

I just noticed, that for the subshell - created for building qt in - this is not true - the complete history is there!
the subshell is entered by giving the command:

bash

and that changes the history behaviour...
 
Old 09-02-2004, 04:34 PM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 65
Quote:
Originally posted by jomen
The script does this - I think:

$WHICH $mk >/dev/null 2>&1

this expands to: which make >/dev/null 2>&1

if I do this on command-line, I get nothing - as is to be expected, since all output is directed to /dev/null and in addition to that any errors that command might give are suppressed - this cannot work - I think

But it is in the configure script and it is supposed to find the location of make (or gmake) and then use this value in the makefiles

Can this code in the configure script even work - for this purpose, that is...?
The script isn't interested in what which says, only if it returns true or false. If make is on the path, which will return true, and the script can just use the command “make”. Otherwise it will return false and it will have to look harder to find the full path. The >/dev/null 2>&1 is just there to stop the user from seeing random stuff on the output of the configure script.
 
Old 09-02-2004, 05:56 PM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Original Poster
Rep: Reputation: 54
Thank you for explaining the script - I see it now...
It first checks if a "make" or "gmake" is there
if it has found one it uses the output of "which make" and assigns it to the variable MAKE

if it does not find eighter one the variable MAKE is still empty and the error occurs

the script did not work because of the shell function I had put into my /etc/profile - as I said above
 
Old 09-03-2004, 09:15 AM   #8
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Original Poster
Rep: Reputation: 54
thanks for all your help - and please forgive me my stupid questions!
I solved every question I had - my last one about my missing history when being root was caused by an entry in /etc/profile - done for security reasons, the BLFS-Book says...
here it is:

if [ $EUID -eq 0 ] ; then
pathappend /sbin:/usr/sbin
unset HISTFILE
fi


I uncommented the "unset HISTFILE" entry and all is like I want it.

I guess I was too tired to see it, when I asked...

This thread is closed now...!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling MPlayer, can't detect X11 during configure. carboncopy Linux - Software 4 07-15-2005 07:56 AM
Qt X11 Free 3.3.4 not compatible with Qt 3.3.2 that comes with Slack 10.0? ta0kira Linux - Software 12 05-09-2005 06:46 AM
mplayer ./configure ignoring x11 martinlinuxuser Linux - Software 6 03-25-2005 03:44 AM
Building QT for X11, Linux. stenquist Programming 2 01-01-2005 10:59 PM
qt-x11-free jackren Debian 10 01-04-2004 10:59 AM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration