Bug 657

Summary: gcc-4.4 build problem for nsc
Product: nsc Reporter: Tom Henderson <tomh>
Component: LinuxAssignee: Sam Jansen <sam.jansen>
Status: RESOLVED FIXED    
Severity: normal CC: fw-ns3, hristo.s.asenov
Priority: P5    
Version: unspecified   
Hardware: All   
OS: All   

Description Tom Henderson 2009-08-11 00:29:41 UTC
I was able to reproduce this on a Fedora Core 11 machine:
gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) 

./build.py 
# Build NSC
Entering directory `nsc'
 =>  python scons.py linux-2.6.18
scons: Reading SConscript files ...
Checking target architecure...(cached) x86
scons: done reading SConscript files.
scons: Building targets ...
g++ -o globaliser/handle_global.o -c -Wall -g -O globaliser/handle_global.cc
globaliser/handle_global.cc:127: error: 'uint32_t' has not been declared
globaliser/handle_global.cc:176: error: 'uint32_t' does not name a type
globaliser/handle_global.cc: In constructor 'NewSymbol::NewSymbol(const std::string&, NewSymbol::Type, int)':
globaliser/handle_global.cc:128: error: class 'NewSymbol' does not have any field named 'm_specifiers'
globaliser/handle_global.cc: In copy constructor 'NewSymbol::NewSymbol(const NewSymbol&)':
globaliser/handle_global.cc:135: error: class 'NewSymbol' does not have any field named 'm_specifiers'
globaliser/handle_global.cc:135: error: 'const class NewSymbol' has no member named 'm_specifiers'
globaliser/handle_global.cc: In member function 'bool NewSymbol::is_extern() const':
globaliser/handle_global.cc:147: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In member function 'bool NewSymbol::is_array() const':
globaliser/handle_global.cc:148: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In member function 'bool NewSymbol::is_pointer() const':
globaliser/handle_global.cc:149: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In member function 'bool NewSymbol::is_static_local() const':
globaliser/handle_global.cc:150: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In member function 'void NewSymbol::set_extern(bool)':
globaliser/handle_global.cc:156: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc:157: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In member function 'void NewSymbol::set_array(bool)':
globaliser/handle_global.cc:160: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc:161: error: 'm_specifiers' was not declared in this scope
globaliser/handle_global.cc: In function 'void global_ns_define_variable(const std::string&, bool, bool, bool, bool, bool, const std::string&)':
globaliser/handle_global.cc:244: error: 'uint32_t' was not declared in this scope
globaliser/handle_global.cc:244: error: expected ';' before 'specifiers'
globaliser/handle_global.cc:245: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:246: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:247: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:248: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:259: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc: In function 'void global_ns_define_mangled_variable(const std::string&, const std::string&, bool, bool, bool, bool, bool)':
globaliser/handle_global.cc:299: error: 'uint32_t' was not declared in this scope
globaliser/handle_global.cc:299: error: expected ';' before 'specifiers'
globaliser/handle_global.cc:300: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:301: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:302: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:303: error: 'specifiers' was not declared in this scope
globaliser/handle_global.cc:304: error: 'specifiers' was not declared in this scope
scons: *** [globaliser/handle_global.o] Error 1
scons: building terminated because of errors.
# Build NSC: failure (ignoring NSC)
Leaving directory `nsc'
Comment 1 Florian Westphal 2009-08-11 14:57:36 UTC
does it work when you add
#include <inttypes.h>

globaliser/handle_global.cc ?

(if not, please paste remaining compiler errors, as I do
not have access to a fc11 box)
Comment 2 Hristo Asenov 2009-08-11 20:14:37 UTC
(In reply to comment #1)
> does it work when you add
> #include <inttypes.h>
> 
> globaliser/handle_global.cc ?
> 
> (if not, please paste remaining compiler errors, as I do
> not have access to a fc11 box)
> 

Hello, I have the same error. I put an "#include <inttypes.h>" inside globalizer/handle_global.cc and it compiled fine. However, I get an error at the very end when it tries to link it. 


[ecks@myhost ns-allinone-3.5]$ ./build.py 
# Build NSC
Entering directory `nsc-0.5.0'
 =>  python scons.py linux-2.6.18
scons: Reading SConscript files ...
Checking target architecure...(cached) x86
scons: done reading SConscript files.
scons: Building targets ...
gcc " " " " - D _ _ A S S E M B L Y _ _ -Ilinux-2.6.18/include -Ilinux-2.6.18/include/asm/mach-default -Isim -Ilinux-2.6.18/nsc -Ilinux-2.6.18/override -c -o linux-2.6.18/arch/i386/lib/checksum.o linux-2.6.18/arch/i386/lib/checksum.S
gcc:  : No such file or directory
gcc:  : No such file or directory
gcc: D: No such file or directory
gcc: _: No such file or directory
gcc: _: No such file or directory
gcc: A: No such file or directory
gcc: S: No such file or directory
gcc: S: No such file or directory
gcc: E: No such file or directory
gcc: M: No such file or directory
gcc: B: No such file or directory
gcc: L: No such file or directory
gcc: Y: No such file or directory
gcc: _: No such file or directory
gcc: _: No such file or directory
gcc: cannot specify -o with -c or -S with multiple files
scons: *** [linux-2.6.18/arch/i386/lib/checksum.o] Error 1
scons: building terminated because of errors.
# Build NSC: failure (ignoring NSC)


Comment 3 Florian Westphal 2009-08-15 06:14:57 UTC
Fixed now, thanks to Tom Henderson for providing a test machine.

You'll need this patch:
https://secure.wand.net.nz/mercurial/nsc/rev/9960b330705d

Also, if you want to use free/openbsd stacks, you'll want
https://secure.wand.net.nz/mercurial/nsc/rev/7a7accc78e3e
if you use gcc 4.4+.

Furthermore, test/net.cc forgot to include <cstdio>.
With those changes nsc should build, link and work on
FC11.
Please re-open if you encounter more issues, thanks
a lot!