LinuxQuestions.org
Review your favorite Linux distribution.
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 12-13-2008, 07:52 AM   #1
prasadbrg
LQ Newbie
 
Registered: Nov 2003
Posts: 27

Rep: Reputation: 15
[SOLVED] Errors while compiling Faust: "PATH_MAX was not declared in this scope"


Hello everyone,
I've been trying to install Faust (http://faust.grame.fr/), downloaded from http://sourceforge.net/projects/faudiostream/ (faust-0.9.9.4b.tar.gz). The README file says:

Code:
 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
After a bit of googling, I found this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=417185. Although it seems to be related, I didnt understand how to work around the problem.

I'm running Mandriva 2009.0.

Any help with this would be appreciated!
Thanks in advance,

Guru

Last edited by prasadbrg; 12-13-2008 at 11:07 PM. Reason: Added [SOLVED] to the title
 
Old 12-13-2008, 10:21 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,751
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
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.
 
Old 12-13-2008, 01:12 PM   #3
prasadbrg
LQ Newbie
 
Registered: Nov 2003
Posts: 27

Original Poster
Rep: Reputation: 15
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:
This is the output of ls:
Code:
[root@localhost faust-0.9.9.4]# ls
architecture/  documentation/              Makefile              tools/
compiler/      examples/                   README                windows/
COPYING        faust-0.9.9.1-1.1-nmu.diff  syntax-highlighting/
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,

Guru
 
Old 12-13-2008, 02:42 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,170

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
Your command seems quite OK !
But you can't patch debian/ not present,
so just hit <Enter>
Asked for file to patch : <Enter>
( if it's not there )

Instead of patching for gcc-4.3, I just installed
g++4.2 ( # urpmi gcc4.2-c++ )

( reason : the patching didn't clear all errors. )

Then make can be run with the "new" compiler :

'CC=gcc4.2 CXX=g++4.2 make'
....

Last edited by knudfl; 12-13-2008 at 04:32 PM.
 
Old 12-13-2008, 11:05 PM   #5
prasadbrg
LQ Newbie
 
Registered: Nov 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Thumbs up Works!

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
 
Old 12-14-2008, 11:36 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,170

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
It' easy to try out :

example
'faust "path-to-faust-0.9.9.4"/examples/bandfilter.dsp'
 
Old 12-15-2008, 02:04 AM   #7
prasadbrg
LQ Newbie
 
Registered: Nov 2003
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks! It's working fine!
 
  


Reply

Tags
compile, scope


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
c++ - "index" is a global scope variable in <string>???? BrianK Programming 2 03-18-2008 09:05 PM
C++ "not declared" errors maxisold Linux - Newbie 3 09-10-2006 07:09 PM
"NIM thread blocked" & "Deadman Switch (DMS) close to trigger" errors sosborne Linux - Networking 1 06-28-2006 03:07 PM
"make" errors compiling new driver mikemrh9 Linux - Software 3 06-22-2004 10:36 AM


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