LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 09-04-2011, 02:22 PM   #1
jelle_
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Rep: Reputation: 0
add_package_user fails when moving lfs-7.0-rc1 from new to old pc


hello

I have just compiled the 7.0-rc1 release on my fast computer. I added package users and DESTDIR-style package management using my own package manager. I'm also using bsd-init scripts.

LFS runs well on my fast computer trough chroot. So I decided to copy LFS to my old computer. That one boots to.

When I try to add a package user on my old computer, i get the following error:
Code:
root@jelle_pentium2 ~ # addpkguser htop htop
/usr/sbin/add_package_user: line 99: 1024 Illegal instruction    expr ${minuid} + 1 2> /dev/null 1>&2
/usr/sbin/add_package_user: line 100: 1025 Illegal instruction    expr ${minuid} + 1 2> /dev/null 1>&2
/usr/sbin/add_package_user: line 101: 1026 Illegal instruction    expr ${minuid} + 1 2> /dev/null 1>&2
/usr/sbin/add_package_user: line 102: 1027 Illegal instruction    expr ${minuid} + 1 2> /dev/null 1>&2
Error: Illegal numeric value!
root@jelle_pentium2 ~ #
note: addpkguser is just the install_package from the package users hint.

I compiled everything on a box running slackware-13.37
Code:
jelle@jelle-desktop ~ $ uname -a
Linux jelle-desktop 2.6.37.6-smp #2 SMP Sat Apr 9 23:39:07 CDT 2011 i686 AMD Phenom(tm) II X3 720 Processor AuthenticAMD GNU/Linux
jelle@jelle-desktop ~ $
the other box
Code:
root@jelle_pentium2 ~ # uname -a
Linux jelle-pentium2 3.0.4 #1 SMP Sun Sep 4 05:41:24 CEST 2011 i686 i686 i386 GNU/Linux
root@jelle_pentium2 ~ #
I hope anyone can help me finding out why this script crashes on my old computer, but works on the other
 
Old 09-05-2011, 07:35 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,489

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
Try
Quote:
view +99 /usr/sbin/add_package_user
see what command exactly is failing.
 
Old 09-05-2011, 10:09 AM   #3
jelle_
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Original Poster
Rep: Reputation: 0
the script fails at the command
Code:
expr ${minuid} + 1 2> /dev/null 1>&2
I tested expr some more and this is the result:
phenom
Code:
root@jelle-desktop / # expr 10000 + 1
10001
root@jelle-desktop / # expr 25 - 3
22
root@jelle-desktop / # expr 25 * 3
expr: syntax error
pentium
Code:
root@jelle-pentium2 / # expr 10000 + 1
Illegal instruction
root@jelle-pentium2 / # expr 25 * 3
expr: syntax error
root@jelle-pentium2 / # expr 25 - 3
Illegal instruction
The last command on my phenom should be legal according to the man page. Does this mean expr is wrong there too?

Also, I assumed that my pentium and my phenom use the same 32-bit instruction set (i686). Am I wrong in this?
 
Old 09-06-2011, 02:45 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,489

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
Quote:
the script fails at the command
Code:
expr ${minuid} + 1 2> /dev/null 1>&2
That might happen if $minuid is not a number.
 
Old 09-08-2011, 02:35 PM   #5
jelle_
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Original Poster
Rep: Reputation: 0
I copied expr from slackware to my lfs system and everything works again. currently compiling gmp and coreutils again. I hope this solves the problem, because compiling is slow without -j6.
 
Old 09-08-2011, 02:55 PM   #6
jelle_
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Original Poster
Rep: Reputation: 0
recompiling gmp and coreutils solved the problem
 
Old 09-10-2011, 10:39 AM   #7
blumbri
LQ Newbie
 
Registered: Aug 2011
Location: California
Distribution: lfs-svn / slackware
Posts: 2

Rep: Reputation: 1
Kind of off topic, but if you want to use '*' with 'expr' you must escape it first:

Code:
# expr 25 \* 3
 
1 members found this post helpful.
Old 09-11-2011, 03:17 AM   #8
jelle_
LQ Newbie
 
Registered: Apr 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by blumbri View Post
Kind of off topic, but if you want to use '*' with 'expr' you must escape it first:

Code:
# expr 25 \* 3
thanks for learning me something new
 
  


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
[SOLVED] LFS 6.6/6.6-rc1, Chapter 6.52: psmisc-22.10 crts Linux From Scratch 8 08-22-2010 09:04 AM
Moving LFS without recompile. exvor Linux From Scratch 1 02-27-2006 07:14 PM
Moving LFS to a new drive LinuxLuvr Linux From Scratch 7 08-03-2004 03:53 AM
LFS-4.0-RC1 released lfslinux Linux From Scratch 1 09-29-2002 04:44 AM
LFS-3.2-RC1 released lfslinux Linux From Scratch 7 02-11-2002 08:13 PM


All times are GMT -5. The time now is 02:45 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