Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    2

    Debian 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!

  2. #2
    Just Joined!
    Join Date
    Feb 2010
    Posts
    2

    Problem solved, steps I took

    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

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •