LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 02-02-2010, 05:36 PM   #1
Winkel
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
Pcalc make error : yacc or pcalc.o missing ??


I had the following error while trying to install pcalc in Debian.
I have bison and flex installed, and looking at the files it looks like there might be a problem with yacc being removed from the Debian library. I'm a newbie but am trying to learn about memory
registration and interaction with the CPU. This program could really help if I could get it to install!
Here's my log:

User:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 5.0.3
Release: 5.0.3


User:~# cd /home/user/Desktop/pcalc
User:/home/user/Desktop/pcalc# ls
pcalc-000 pcalc-000.tar.gz
User:/home/user/Desktop/pcalc# cd pcalc-000
User:/home/user/Desktop/pcalc/pcalc-000# ls
convert.c help.h pcalc.c pcalc.map print.c skeleton.h symbol.h
convert.h hocdecl.h pcalc.h pcalc.old print.h store.c testdat
DISCAIMER Makefile pcalcl.c pcalc.tab.c ptest store.h testdata
EXAMPLE math.c pcalcl.l pcalc.tab.h README str.c testorig
funct.c pack pcalc.lsm pcalc.txt skelcom.h str.h win32
help.c pcalc pcalc.mak pcalc.y skeleton.c symbol.c


User:/home/user/Desktop/pcalc/pcalc-000# make
cc -c -o pcalc.o pcalc.c
flex -opcalcl.c pcalcl.l
pcalcl.l:290: warning, rule cannot be matched
cc -c pcalcl.c -o pcalcl.o
pcalcl.c:701:25: error: macro "yywrap" passed 1 arguments, but takes just 0
make: *** [pcalcl.o] Error 1

User:~# flex -V
flex 2.5.35
User:~# bison -V
bison (GNU Bison) 2.3


I would really appreciate the help! Thanks and have a great day!
 
Old 02-02-2010, 06:04 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Hi and welcome to LinuxQuestions!

Hmmm... I don't know exactly what's going on with the yywrap error, but the software you're trying to install is 12 years-old. Luckily, they released a new version that can be downloaded from the pcalc project at Sourceforge.
 
Old 02-03-2010, 04:49 AM   #3
Winkel
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Original Poster
Rep: Reputation: 0
LZMA SetDecoderProperties() error

Thanks Guru... I had also tried to install pcalc-2.tar.lzma from sourceforge.net. LZMA was giving a problem:

user@Debian:~/Desktop/pcalc/pcalc2$ ls
pcalc-2.tar.lzma
user@Debian:~/Desktop/pcalc/pcalc2$ lzma -cdfk pcalc-2.tar.lzma
lzma: SetDecoderProperties() error

I've seen some detailed code on the internet that seems to setup this missing or incorrect value properly. Again, I can't read code that well yet.

http://sourceforge.net/projects/seve.../topic/3047842

I also downloaded the file onto my Windoze machine and it unzipped fine with 7-zip. But I'm typing something wrong:

user@Debian:~/Desktop/pcalc/pcalc2$ 7zr -e pcalc-2.tar.lzma


Error:
Incorrect command line
noam@Debian:~/Desktop/pcalc/pcalc2$

I'd like to figure out my LZMA problem so I can use it in the future correctly. Thanks a millie'
 
Old 02-03-2010, 05:03 AM   #4
Dr_P_Ross
Member
 
Registered: Nov 2003
Location: Edinburgh, UK
Distribution: Arch
Posts: 43

Rep: Reputation: 18
You might also like to try the calc program, available from
http://isthe.com/chongo/tech/comp/calc/.

It is a very powerful arbitrary-precision programmable, command-line-driven calculator that handles binary, hex etc too. For example:
Quote:
% calc
C-style arbitrary precision calculator (version 2.12.3.3)
Calc is open software. For license details type: help copyright
[Type "exit" to exit, or "help" for help.]

; 0x1234 + 0x20
4692
; config("mode2", "hex")
"off"
; 0x1234 + 0x20
4692 /* 0x1254 */
;
(the config command returns the previous setting). Lots of built-in help too.
 
Old 02-03-2010, 08:44 AM   #5
Winkel
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Problem solved, steps I took

Thanks Colucix and Dr Ross.

I was able to fix the problem and got Pcalc-2 running properly!

Solution:

1) Downloaded pcalc-2.tar.lzma from windows machine
2) Unzipped with 7 zip leaving pcalc-2.tar in place
3) FTP uploaded the directory to my virtual server
4) FTP Downloaded the files individually to my Debian home box
5) cd into the directory
6) make

terminal output:

bison -ld -o pcalc.c pcalc.y
pcalc.y: conflicts: 67 shift/reduce, 37 reduce/reduce
pcalc.y:73.13-16: warning: rule never reduced because of conflicts: list: list
cc -ggdb -Wall -DVERSION='"2"' -c -o pcalc.o pcalc.c
cc -ggdb -Wall -DVERSION='"2"' -c -o pcalcl.o pcalcl.c
pcalcl.c:1870: warning: âyyunputâ defined but not used
pcalcl.c:1913: warning: âinputâ defined but not used
cc -ggdb -Wall -DVERSION='"2"' -c -o funct.o funct.c
cc -ggdb -Wall -DVERSION='"2"' -c -o math.o math.c
cc -ggdb -Wall -DVERSION='"2"' -c -o symbol.o symbol.c
cc -ggdb -Wall -DVERSION='"2"' -c -o help.o help.c
cc -ggdb -Wall -DVERSION='"2"' -c -o store.o store.c
cc -ggdb -Wall -DVERSION='"2"' -c -o print.o print.c
cc -ggdb -Wall -DVERSION='"2"' -c -o str.o str.c
cc -ggdb -Wall -DVERSION='"2"' -c -o convert.o convert.c
cc pcalc.o pcalcl.o funct.o math.o symbol.o help.o store.o print.o str.o convert.o -lm -lfl -o pcalc

7) make install

Debian:/home/user/Desktop/pcalc/thepcalc2# make install
install -m 755 -D pcalc /usr/bin/pcalc

8) Solved!

Debian:/home/user/Desktop/pcalc/thepcalc2# pcalc

Programmer's calculator by Peter Glen. Version 2

For functions type pcalc f
For controls type pcalc l
For operators type pcalc o
For constants type pcalc c
 
Old 02-03-2010, 04:25 PM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Glad to see the problem solved. Cheers!
 
  


Reply

Tags
calc, debian, error, install, lenny, linux



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
aubio make script returning missing libjack.so.0 error on opensuse10.2 :( chickenlinux Linux - Software 4 10-18-2008 08:42 AM
Just downloaded pcalc.tar.gz, how do I install this bad boy? trist007 Linux - Newbie 9 07-03-2008 08:17 PM
Make: Yacc: Command Not Found, about mak flex singying304 Mandriva 1 06-06-2006 02:02 AM
Debian kernel 2.6.7-1-686 - Error MAKE XCONFIG - Missing QTDIR BaptismOfFire Linux - Software 4 09-02-2004 06:15 PM
k3b make returns error, am I missing something? corso64 Linux - Software 3 07-02-2004 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 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
Open Source Consulting | Domain Registration