hust-marx / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

examples build failed on mac #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. clone trunk 
2. ./prepmac.sh examples buildex -DCMAKE_BUILD_TYPE=Debug 
-DWITH_SYSTEM_BOOST=on -DBoost_ADDITIONAL_VERSION="1.43;1.43.0" 
-DCMAKE_OSX_ARCHITECTURES=i386  
3. cd buildex && cmake --build .
[[....]]
CompileC 
buildex/projects/FBTestPlugin/FireBreath.build/Debug/FBTestPlugin.build/Objects-
normal/i386/FBTestPluginAPI.o 
/Users/nikita/Projects/firebreath/examples/FBTestPlugin/FBTestPluginAPI.cpp 
normal i386 c++ com.apple.compilers.gcc.4_0                                     

    cd /Users/nikita/Projects/firebreath                                                                                                                     
    /Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -DCMAKE_INTDIR="Debug" -DXP_MACOSX=1 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -gdwarf-2 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/Debug -I/Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/Debug/include -I/Users/nikita/Projects/firebreath/examples/FBTestPlugin -I/Users/nikita/Projects/firebreath/src/3rdParty/gecko-sdk/includes -I/Users/nikita/Projects/firebreath/src/ActiveXPlugin -I/Users/nikita/Projects/firebreath/src/NpapiPlugin -I/Users/nikita/Projects/firebreath/src/ScriptingCore -I/Users/nikita/Projects/firebreath/src/PluginCore -I/Users/nikita/Projects/firebreath/src/PluginWindow -I/Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/gen -I/opt/local/include -I/Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/FireBreath.build/Debug/FBTestPlugin.build/DerivedSources/i386 -I/Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/FireBreath.build/Debug/FBTestPlugin.build/DerivedSources -DXP_UNIX -DXP_MACOSX -DXP_UNIX -DXP_MACOSX -c /Users/nikita/Projects/firebreath/examples/FBTestPlugin/FBTestPluginAPI.cpp -o /Users/nikita/Projects/firebreath/buildex/projects/FBTestPlugin/FireBreath.build/Debug/FBTestPlugin.build/Objects-normal/i386/FBTestPluginAPI.o                                                                                                                               
/Users/nikita/Projects/firebreath/examples/FBTestPlugin/FBTestPluginAPI.cpp:1: 
error: expected unqualified-id before 'OTHER' token                           
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++
config.h:68: error: expected namespace-name before ';' token                 
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++
config.h:68: error: '<type error>' is not a namespace        

There is unprintable symbol at 1 line 
hg diff examples/ 
examples/FBTestPlugin/FBTestPluginAPI.cpp
diff -r b8e7be52fb07 examples/FBTestPlugin/FBTestPluginAPI.cpp                  

--- a/examples/FBTestPlugin/FBTestPluginAPI.cpp Wed Sep 15 17:13:31 2010 -0600  

+++ b/examples/FBTestPlugin/FBTestPluginAPI.cpp Thu Sep 16 10:42:35 2010 +0400  

@@ -1,4 +1,4 @@                                                                 

-/**********************************************************\                   

+/**********************************************************\                   

 Original Author: Richard Bateman and Georg Fritzsche                                                                                                        

 Created:    December 3, 2009                                                                                                                                
@@ -200,4 +200,4 @@                                                             

 {                                                                                                                                                           
     StreamsTest test( m_host );                                                                                                                             
     return test.run();                                                                                                                                      
-}                                                                              

\ No newline at end of file                                                     

+}                                                         

how to fix it:
open in vim examples/FBTestPlugin/FBTestPluginAPI.cpp
press x three times :) (at first line first symbol) 
:wq

Original issue reported on code.google.com by bignikita on 16 Sep 2010 at 6:45

GoogleCodeExporter commented 9 years ago
I have just tested with a fresh clone and cannot reproduce this issue.  I 
suspect the problem is somehow unique to your clone.  I suggest creating a new 
one and see if the problem persists.

Thanks for reporting this so quickly, though; that would be a problem if it 
were common =]

Original comment by taxilian on 16 Sep 2010 at 5:28

GoogleCodeExporter commented 9 years ago
I can reproduce it with clean copy ... 
Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; 
root:xnu-1228.15.4~1/RELEASE_I386 i386

Original comment by bignikita on 16 Sep 2010 at 7:04

GoogleCodeExporter commented 9 years ago
Can anyone else reproduce this issue?  I need to know how prevalent this 
problem is, if it is serious enough to justify creating a new release for.

Original comment by taxilian on 16 Sep 2010 at 7:07

GoogleCodeExporter commented 9 years ago
Sounds like BOM (Byte Order Mark) at the beginning on some files is screwing 
things up on Mac. I suspect the reason why we never caught it has something to 
do with gcc version; bignikita here appears to be using gcc 4.0 whereas I use 
gcc 4.2.

Original comment by kalevlember@gmail.com on 16 Sep 2010 at 7:21

GoogleCodeExporter commented 9 years ago
I can't reproduce this using:
 * i686-apple-darwin10-g++-4.2.1 
 * Darwin Kernel Version 10.4.0; root:xnu-1504.7.4~1/RELEASE_I386 i386

Maybe its due to using GCC 4.0?

Original comment by georg.fritzsche on 16 Sep 2010 at 7:21

GoogleCodeExporter commented 9 years ago
I found two files that have BOM:
src/unittest-cpp/UnitTest++/UnitTest++.vsnet2005.sln
examples/FBTestPlugin/FBTestPluginAPI.cpp

Removed it from the .cpp file (the .sln file is not used in Firebreath build 
and Visual Studio probably likes BOMs):
http://code.google.com/p/firebreath/source/detail?r=cf16b6749ca03d6f250c56f206d3
efd2d07e5c37

Original comment by kalevlember@gmail.com on 16 Sep 2010 at 7:34

GoogleCodeExporter commented 9 years ago
Thanks, Kalev.  We'll put that in the nightly and wait to put out a release to 
see if any more bugs surface or if more people notice, since it only affects a 
small percentage of our userbase.

thanks for catching that, Nikita, and Kalev for doing the fix.

Original comment by taxilian on 16 Sep 2010 at 7:52

GoogleCodeExporter commented 9 years ago
I can confirm that this issue affects system version gcc-4.0. With gcc-4.2 
compilation is successful

Original comment by bignikita on 16 Sep 2010 at 8:04