Errors while compiling Faust: "PATH_MAX was not declared in this scope"
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There is no configuration phase. To compile and install the Faust compiler do :
make
su
make install
Accordingly, after copying to /usr/local/ and doing 'tar -xvzf faust-0.9.9.4b.tar.gz' and entering the directory, I typed 'make'. After a stream of warning messages, this happened:
Code:
g++ -g -O3 -Wall -Wuninitialized -Iboxes -Ierrors -Ievaluate -Igenerator -Inormalize -Iparser -Ipropagate -Isignals -Itlib -Idraw -Idraw/device -Idraw/schema -Iextended -Ipatternmatcher -c -o parallelize/colorize.o parallelize/colorize.cpp
In file included from tlib/tlib.hh:165,
from parallelize/colorize.h:7,
from parallelize/colorize.cpp:7:
tlib/node.hh: In function ‘bool isZero(const Node&)’:
tlib/node.hh:157: warning: suggest parentheses around && within ||
tlib/node.hh: In function ‘bool isGEZero(const Node&)’:
tlib/node.hh:163: warning: suggest parentheses around && within ||
tlib/node.hh: In function ‘bool isGTZero(const Node&)’:
tlib/node.hh:169: warning: suggest parentheses around && within ||
tlib/node.hh: In function ‘bool isOne(const Node&)’:
tlib/node.hh:175: warning: suggest parentheses around && within ||
tlib/node.hh: In function ‘bool isMinusOne(const Node&)’:
tlib/node.hh:181: warning: suggest parentheses around && within ||
g++ -g -O3 -Wall -Wuninitialized -Iboxes -Ierrors -Ievaluate -Igenerator -Inormalize -Iparser -Ipropagate -Isignals -Itlib -Idraw -Idraw/device -Idraw/schema -Iextended -Ipatternmatcher -c -o parser/enrobage.o parser/enrobage.cpp
parser/enrobage.cpp: In function ‘std::ifstream* open_path_stream(const char*, const char*)’:
parser/enrobage.cpp:75: error: ‘PATH_MAX’ was not declared in this scope
parser/enrobage.cpp:80: error: ‘old’ was not declared in this scope
parser/enrobage.cpp:85: error: ‘free’ was not declared in this scope
parser/enrobage.cpp:93: error: ‘free’ was not declared in this scope
parser/enrobage.cpp: In function ‘std::ifstream* open_arch_stream(const char*)’:
parser/enrobage.cpp:108: error: ‘getenv’ was not declared in this scope
parser/enrobage.cpp: In function ‘FILE* fopensearch(const char*)’:
parser/enrobage.cpp:144: error: ‘getenv’ was not declared in this scope
parser/enrobage.cpp: In function ‘FILE* fopenpath(const char*, const char*)’:
parser/enrobage.cpp:153: error: ‘PATH_MAX’ was not declared in this scope
parser/enrobage.cpp:157: error: ‘old’ was not declared in this scope
parser/enrobage.cpp:164: error: ‘free’ was not declared in this scope
parser/enrobage.cpp:172: error: ‘free’ was not declared in this scope
make[1]: *** [parser/enrobage.o] Error 1
make[1]: Leaving directory `/usr/local/faust-0.9.9.4/compiler'
make: *** [all] Error 2
Download the patch they have and apply it. From the top of the faust source tree, execute patch -Np1 -i /path/to/faust-0.9.9.1-1.1-nmu.diff. Of course, replace the /path/to portion with the correct relative or absolute path.
Thanks weilbullguy, for the response!
I downloaded the *.diff file, and moved it to the faust-0.9.9.4 directory (the one created by opening the tarball) - this is the same directory that contains the Makefile. I assumed this is what you referred to as the top of the source tree.
I ran
Code:
patch -Np1 -i faust-0.9.9.1-1-nmu.diff
, and this was the output:
Code:
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -u faust-0.9.9.1/debian/changelog faust-0.9.9.1/debian/changelog
|--- faust-0.9.9.1/debian/changelog
|+++ faust-0.9.9.1/debian/changelog
--------------------------
File to patch:
I haven't used the 'patch' utility before - the command wasn't there on my system, I just installed it through urpmi. I would appreciate any help with this.
Thanks in advance,
Thanks knudfl for the response....
Your solution worked! I used the older gcc and it seems to have compiled - there is an executable now, and I need to learn how to get it to run.
Thanks once again.
Cheers,
Guru
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.