wuzhipeng2014 / freenos

Automatically exported from code.google.com/p/freenos
GNU General Public License v3.0
0 stars 0 forks source link

Compilation on at least MacOSX 10.5.7 fails #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
guydhollosy has tested compiling /trunk on MacOSX 10.5.7, and found out it
failed to compile
with the following error:

guy-laptop-2:FreeNOS guydhollosy$ scons VERBOSE=1 iso
scons: Reading SConscript files ...
Checking for -fno-stack-protector ... (cached) no
Checking for -O0 ... (cached) no
Checking for -g3 ... (cached) no
Checking for -Wall ... (cached) no
Checking for -W ... (cached) no
Checking for -Wno-unused-parameter ... (cached) no
Checking for -Werror ... (cached) no
Checking for -fno-builtin ... (cached) no
Checking for -nostdinc ... (cached) no
Checking for -Wno-write-strings ... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
g++ -o bin/bench/Main.o -c -fno-rtti -fno-exceptions -Iinclude -Ilib/libcrt
-include lib/libcrt/Default.h -Ilib/liballoc -include
lib/liballoc/Default.h -Ilib/libposix -include lib/libposix/Default.h
-Ilib/libexec -include lib/libexec/Default.h -Ilib/libc -include
lib/libc/Default.h -Isrv/memory -Isrv -Ibin/bench bin/bench/Main.cpp
include/string.h: In constructor ‘String::String(char*)’:
include/string.h:60: error: ‘strdup’ was not declared in this scope
include/string.h: In constructor ‘String::String(String*)’:
include/string.h:69: error: ‘strdup’ was not declared in this scope
include/string.h: In constructor ‘String::String(const char*)’:
include/string.h:78: error: ‘strdup’ was not declared in this scope
include/string.h: In constructor ‘String::String(const char*, 
Size)’:

Note that it throws errors about include/String.h (uppercase 'S'). It seems
it can't find
any functions declared in lib/libc/string.h (lowercase 's'), because it
thinks #include <String.h>
is the same as #include <string.h>. Their filesystem is probably
case-insensitive. A simple test
confirms this:

17:39 <@ddr-> guy-laptop-2:FreeNOS guydhollosy$ ls Bin
17:39 <@ddr-> SConscript bench cat echo hostname ls memstat mknod mount
parse ps sh
stat uname
17:39 <@ddr-> guy-laptop-2:FreeNOS guydhollosy$ ls bin/
17:39 <@ddr-> SConscript bench cat echo hostname ls memstat mknod mount
parse ps sh
stat uname

We may be able to fix this issue, by either find a way to disable the
case-insensitiveness or
placing all include/*.h files in a separate directory, like: #include
<FooBar/String.h>.

Original issue reported on code.google.com by coenbijlsma on 7 Aug 2009 at 11:43