LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2003, 11:23 AM   #1
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Rep: Reputation: 15
Question first time compiling, what am I doing wrong?


I'm trying to get longrun to work on Redhat 9. Since they haven't bothered to update longrun in their kernel-utils package, I need to patch longrun and recompile it to over come a known bug. Catch is, I think the patch was build for Debian. I hope it doesn't matter...

I did a "patch < longrun_0.9-10.diff" then a "Makefile" and below is the output from the Makefile, what am I doing wrong?

Code:
[root@localhost longrun]# /tmp/longrun/Makefile
/tmp/longrun/Makefile: line 1: include: command not found
/tmp/longrun/Makefile: line 8: CATOBJEXT: command not found
/tmp/longrun/Makefile: line 9: INSTOBJEXT: command not found
/tmp/longrun/Makefile: line 11: .SUFFIXES:: command not found
/tmp/longrun/Makefile: line 1: GMOFILES: command not found
/tmp/longrun/Makefile: line 13: all:: command not found
/tmp/longrun/Makefile: line 15: longrun.pot:: command not found
xgettext: error while opening "../longrun.c" for reading: No such file or directory
/tmp/longrun/Makefile: line 18: .po.pox:: command not found
Makefile:1: ../Makeconfig: No such file or directory
Makefile:62: warning: overriding commands for target `install'
Makefile:30: warning: ignoring old commands for target `install'
Makefile:71: warning: overriding commands for target `clean'
Makefile:46: warning: ignoring old commands for target `clean'
make: *** No rule to make target `../Makeconfig'.  Stop.
msgmerge: exactly 2 input files required
Try `msgmerge --help' for more information.
/tmp/longrun/Makefile: line 22: .po.mo:: command not found
/tmp/longrun/Makefile: line 23: syntax error near unexpected token `newline'
/tmp/longrun/Makefile: line 23: `       msgfmt -o $@ $<'
[root@localhost longrun]# ls
changelog  copyright  longrun_0.9-10.diff  longrun.pot        postinst
compat     default    longrun.1            Makeconfig         README.Debian
control    event.d    longrun.1.ja         MAKEDEV-cpuid-msr  rules
COPYING    ja.po      longrun.c            Makefile           watch
[root@localhost longrun]#
 
Old 10-25-2003, 11:29 AM   #2
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 35
Yeah...you don't actually run a Makefile.

You go to the directory where it is located and type 'make'.
 
Old 10-25-2003, 11:35 AM   #3
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Original Poster
Rep: Reputation: 15
Doh! Thanks. So is 'longrun.1' the new executable?
Code:
[root@localhost longrun]# make
Makefile:1: ../Makeconfig: No such file or directory
Makefile:62: warning: overriding commands for target `install'
Makefile:30: warning: ignoring old commands for target `install'
Makefile:71: warning: overriding commands for target `clean'
Makefile:46: warning: ignoring old commands for target `clean'
make: *** No rule to make target `../Makeconfig'.  Stop.
[root@localhost longrun]# ls
changelog  default              longrun.1.ja       Makefile       watch
compat     event.d              longrun.c          Makefile.rej
control    ja.po                longrun.pot        postinst
COPYING    longrun_0.9-10.diff  Makeconfig         README.Debian
copyright  longrun.1            MAKEDEV-cpuid-msr  rules

Last edited by über-noob; 10-25-2003 at 11:38 AM.
 
Old 10-25-2003, 11:43 AM   #4
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 35
I doubt it...it's the manual page.
 
Old 10-25-2003, 11:57 AM   #5
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Original Poster
Rep: Reputation: 15
I edit my post above for the output from Make... what am i doing wrong?
 
Old 10-25-2003, 04:26 PM   #6
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Original Poster
Rep: Reputation: 15
Okay, so I patched and found instructions to complie but it still won't work, am I on the right track?

Code:
[root@localhost longrun-0.9.orig]# ls
COPYING  longrun_0.9-10.diff  longrun.1  longrun.c  MAKEDEV-cpuid-msr  Makefile
[root@localhost longrun-0.9.orig]# patch < longrun_0.9-10.diff
patching file Makefile
patching file longrun.c
patching file compat
patching file control
patching file changelog
patching file rules
patching file postinst
patching file README.Debian
patching file copyright
patching file default
patching file event.d
patching file watch
patching file Makefile
patching file ja.po
patching file longrun.pot
patching file longrun.1.ja
patching file Makeconfig
[root@localhost longrun-0.9.orig]# ./configure && make && make install
bash: ./configure: No such file or directory
 
Old 10-25-2003, 08:24 PM   #7
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 35
Well, for one you're trying to run a configure script that doesn't exist.

Just type 'make'.
 
Old 10-26-2003, 11:03 AM   #8
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Original Poster
Rep: Reputation: 15
I get errors with 'make' too. I feel like a dolt but I can't figure this out...

Code:
[root@localhost longrun-0.9.orig]# make
Makefile:62: warning: overriding commands for target `install'
Makefile:30: warning: ignoring old commands for target `install'
Makefile:71: warning: overriding commands for target `clean'
Makefile:46: warning: ignoring old commands for target `clean'
make -C po
make: *** po: No such file or directory.  Stop.
make: *** [stamp-po] Error 2


[root@localhost longrun-0.9.orig]# more Makefile
include Makeconfig
 
POFILES=ja.po
GMOFILES=ja.gmo
 
POTFILES=../longrun.c
 
CATOBJEXT = .gmo
INSTOBJEXT = .mo
 
.SUFFIXES: .c .o .po .pox .gmo .mo
 
all: $(GMOFILES)
 
longrun.pot: ../longrun.c
        xgettext -a -d longrun -k_ -o longrun.pot -s ../longrun.c
 
.po.pox:
        make longrun.pot
        msgmerge $< longrun.pot -o $*.pox
 
.po.mo:
        msgfmt -o $@ $<
 
.po.gmo:
        file=`echo $* | sed 's,.*/,,'`.gmo \
          && rm -f $$file && msgfmt -o $$file $<
 
install:
        mkdir -p $(DESTDIR)$(LOCALEDIR)
 
        @catalogs='$(GMOFILES)'; \
        localedir='$(DESTDIR)$(LOCALEDIR)'; \
        for cat in $$catalogs; do \
          cat=`basename $$cat`; \
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
          dir=$$localedir/$$lang/LC_MESSAGES; \
          mkdir -p $$dir; \
          if test -r $$cat; then \
            install -m 644 $$cat $$dir/$(PACKAGE)$(INSTOBJEXT) || exit 1; \
            echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
          fi \
        done
 
clean:
        rm -f *.mo *.gmo
include Makeconfig
 
all: longrun README stamp-po
 
longrun: longrun.c
        gcc -DLOCALEDIR=\"$(LOCALEDIR)\" -g -O2 -W -Wall -o longrun longrun.c
 
README: longrun.1
        groff -Tascii -man longrun.1 | col -bx > README
 
stamp-po:
        make -C po
        touch stamp-po
 
install: all
        mkdir -p $(DESTDIR)$(BINDIR)
        install -o root -g root -m 755 longrun $(DESTDIR)$(BINDIR)/longrun
        mkdir -p $(DESTDIR)$(MANDIR)/man1
        install -m 644 longrun.1 $(DESTDIR)$(MANDIR)/man1/longrun.1
        mkdir -p $(DESTDIR)$(MANDIR)/ja/man1
        install -m 644 longrun.1.ja $(DESTDIR)$(MANDIR)/ja/man1/longrun.1
        make -C po install
 
clean:
        -rm -f longrun README stamp-po *~
        make -C po clean

[root@localhost longrun-0.9.orig]# more Makeconfig
PACKAGE=longrun
 
PREFIX=/usr
BINDIR=$(PREFIX)/bin
DATADIR=$(PREFIX)/share
 
MANDIR=$(DATADIR)/man
LOCALEDIR=$(DATADIR)/locale

Last edited by über-noob; 10-26-2003 at 11:12 AM.
 
Old 10-27-2003, 08:46 PM   #9
über-noob
LQ Newbie
 
Registered: Sep 2003
Distribution: Redhat 9 with 2.4.22 kernel
Posts: 27

Original Poster
Rep: Reputation: 15
Happy ending. Luckily, the script gets far enough to complie the new longrun executable. I run it and the bug is gone, it works properly. I'll go through the Makeconfig script by hand and work the rest out.
 
Old 03-12-2004, 10:37 AM   #10
ia64processor
Member
 
Registered: Sep 2003
Location: Tokyo
Distribution: Red Hat
Posts: 41

Rep: Reputation: 15
er-noob,

May I ask how you fix the longrun?

Many thanks
 
  


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
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 10:58 PM
my time is wrong and calender is also wrong Paxmaster Linux - General 6 12-16-2004 01:46 AM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 04:25 PM
my time is wrong~~!! yjwon6 General 3 09-15-2003 06:27 AM
my time is wrong~~! yjwon6 Linux - Software 2 09-15-2003 04:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 AM.

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