Hxcpp linux build issues (was Re: hxcpp build issues)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hxcpp linux build issues (was Re: hxcpp build issues)

clemos
Hi

Just creating a new thread, because
I wanted to test the cpp target, but am having the exact same issue...
I'm on Ubuntu 64bit as well...
I know almost nothing of c++, so I'm afraid I can't help much

++++++++
Clément

On Mon, Jul 27, 2009 at 5:01 AM, gershon<[hidden email]> wrote:

> Great work first of all,  though i also got build issues, tried this simple:
>
> class Test {
>     static function main() {
>         trace("Hello World !");
>     }
> }
>
> with:
> OSTYPE=linux haxe -cpp out -main Test
>
> on first run:
>
> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
> gcc -c -fvisibility=hidden -O2 -m64 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/Test.cpp -oobj/linux/src/Test.o
> In file included from ./src/Test.cpp:1:
> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h: In constructor
> ‘String::String(const wchar_t*)’:
> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h:300: error: ‘wcslen’ was
> not declared in this scope
> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h: In member function ‘int
> String::compare(const String&) const’:
> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h:355: error: ‘wcscmp’ was
> not declared in this scope
> ./src/Test.cpp: In member function ‘virtual Dynamic Test_obj::__Field(const
> String&)’:
> ./src/Test.cpp:51: error: ‘memcmp’ was not declared in this scope
> Called from <null> line 1
> Called from BuildTool.hx line 607
> Called from BuildTool.hx line 292
> Called from a C function
> Called from BuildTool.hx line 315
> Called from BuildTool.hx line 379
> Called from BuildTool.hx line 106
> Uncaught exception - Error : 256 - build cancelled
>
> after including <wchar.h> and <string.h> in hxObject.h:
>
> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
> mkdir obj
> mkdir obj/linux
> mkdir obj/linux/src
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/Test.cpp -oobj/linux/src/Test.o
> mkdir obj/linux/src/haxe
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/haxe/Log.cpp -oobj/linux/src/haxe/Log.o
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/Std.cpp -oobj/linux/src/Std.o
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/__boot__.cpp -oobj/linux/src/__boot__.o
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/__resources__.cpp -oobj/linux/src/__resources__.o
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude -frtti
> ./src/__main__.cpp -oobj/linux/src/__main__.o
> mkdir obj/linux/runtime
> mkdir obj/linux/runtime/src
> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include
> -DBUILDING_HXCPP_DLL -D_CRT_SECURE_NO_DEPRECATE -DALL_INTERIOR_POINTERS
> -DGC_NOT_DLL -DNO_THREAD_REDIRECT -DGC_THREADS
> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/include
> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/include/private
> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/libatomic_ops-1.2/src
> -frtti /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp
> -oobj/linux/runtime/src/hxObject.o
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:17: error:
> ‘uint64_t’ does not name a type
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In member
> function ‘char* String::__CStr() const’:
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1134: warning:
> deprecated conversion from string constant to ‘char*’
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In function ‘int
> __int__(double)’:
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1480: error:
> ‘__int64’ was not declared in this scope
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1480: error:
> expected ‘;’ before ‘big_int’
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1481: error:
> ‘big_int’ was not declared in this scope
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In function
> ‘Array<String> __get_args()’:
> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1793: error:
> ‘getpid’ was not declared in this scope
> Called from <null> line 1
> Called from BuildTool.hx line 607
> Called from BuildTool.hx line 292
> Called from a C function
> Called from BuildTool.hx line 315
> Called from BuildTool.hx line 379
> Called from BuildTool.hx line 106
> Uncaught exception - Error : 256 - build cancelled
>
> tried adding "-m64" to BuildCommon.xml, with no luck, also tried
> "-march=x86_64" (from /usr/bin/arch), and got:
>
>  "/home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1: error: bad
> value (x86_64) for -mtune= switch"
>
> There's a couple more switches for 64bit platforms, like big\little endians
> an others, but the -m64 usually does it.
> Have'nt tried in a 32bit chroot, but will if you need it for testing...
>
> I'm on Linux 2.6.31-3-generic x86_64 GNU/Linux, gcc version 4.4.1 (Ubuntu
> 4.4.1-1ubuntu1)
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Hxcpp linux build issues (was Re: hxcpp build issues)

Gamehaxe
Hi,
I have made a few minor changes to the hxcpp files.
I am currently trying to download a 64bit virtual machine
to test them, but is you would like to give them a go
 from svn you can do it something like this:

cd ~/somepath
svn checkout http://hxcpp.googlecode.com/svn/trunk/ hxcpp
haxelib dev hxcpp ~/somepath/hxcpp

and

haxelib dev hxcpp

to go back to release versions.


I have also fixed the OSPATH for BuildTool (thanks Philipp)

Otherwise i'll do a new release soon-ish.

On somewhat related note, should I be doing separate linux64 binaries?

Hugh



> Hi
>
> Just creating a new thread, because
> I wanted to test the cpp target, but am having the exact same issue...
> I'm on Ubuntu 64bit as well...
> I know almost nothing of c++, so I'm afraid I can't help much
>
> ++++++++
> Clément
>
> On Mon, Jul 27, 2009 at 5:01 AM, gershon<[hidden email]> wrote:
>> Great work first of all,  though i also got build issues, tried this  
>> simple:
>>
>> class Test {
>>     static function main() {
>>         trace("Hello World !");
>>     }
>> }
>>
>> with:
>> OSTYPE=linux haxe -cpp out -main Test
>>
>> on first run:
>>
>> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
>> gcc -c -fvisibility=hidden -O2 -m64 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/Test.cpp -oobj/linux/src/Test.o
>> In file included from ./src/Test.cpp:1:
>> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h: In constructor
>> ‘String::String(const wchar_t*)’:
>> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h:300: error: ‘wcslen’  
>> was
>> not declared in this scope
>> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h: In member function  
>> ‘int
>> String::compare(const String&) const’:
>> /home/gershon/haxelib/hxcpp/1,0/include/hxObject.h:355: error: ‘wcscmp’  
>> was
>> not declared in this scope
>> ./src/Test.cpp: In member function ‘virtual Dynamic  
>> Test_obj::__Field(const
>> String&)’:
>> ./src/Test.cpp:51: error: ‘memcmp’ was not declared in this scope
>> Called from <null> line 1
>> Called from BuildTool.hx line 607
>> Called from BuildTool.hx line 292
>> Called from a C function
>> Called from BuildTool.hx line 315
>> Called from BuildTool.hx line 379
>> Called from BuildTool.hx line 106
>> Uncaught exception - Error : 256 - build cancelled
>>
>> after including <wchar.h> and <string.h> in hxObject.h:
>>
>> haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_204 -Dtrue
>> mkdir obj
>> mkdir obj/linux
>> mkdir obj/linux/src
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/Test.cpp -oobj/linux/src/Test.o
>> mkdir obj/linux/src/haxe
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/haxe/Log.cpp -oobj/linux/src/haxe/Log.o
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/Std.cpp -oobj/linux/src/Std.o
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/__boot__.cpp -oobj/linux/src/__boot__.o
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/__resources__.cpp -oobj/linux/src/__resources__.o
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include -Iinclude  
>> -frtti
>> ./src/__main__.cpp -oobj/linux/src/__main__.o
>> mkdir obj/linux/runtime
>> mkdir obj/linux/runtime/src
>> gcc -c -fvisibility=hidden -O2 -DHX_LINUX
>> -I/home/gershon/haxelib/hxcpp/1,0/include -I/usr/include
>> -DBUILDING_HXCPP_DLL -D_CRT_SECURE_NO_DEPRECATE -DALL_INTERIOR_POINTERS
>> -DGC_NOT_DLL -DNO_THREAD_REDIRECT -DGC_THREADS
>> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/include
>> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/include/private
>> -I/home/gershon/haxelib/hxcpp/1,0//runtime/thirdparty/gc-7.1/libatomic_ops-1.2/src
>> -frtti /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp
>> -oobj/linux/runtime/src/hxObject.o
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:17: error:
>> ‘uint64_t’ does not name a type
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In member
>> function ‘char* String::__CStr() const’:
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1134: warning:
>> deprecated conversion from string constant to ‘char*’
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In function  
>> ‘int
>> __int__(double)’:
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1480: error:
>> ‘__int64’ was not declared in this scope
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1480: error:
>> expected ‘;’ before ‘big_int’
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1481: error:
>> ‘big_int’ was not declared in this scope
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp: In function
>> ‘Array<String> __get_args()’:
>> /home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1793: error:
>> ‘getpid’ was not declared in this scope
>> Called from <null> line 1
>> Called from BuildTool.hx line 607
>> Called from BuildTool.hx line 292
>> Called from a C function
>> Called from BuildTool.hx line 315
>> Called from BuildTool.hx line 379
>> Called from BuildTool.hx line 106
>> Uncaught exception - Error : 256 - build cancelled
>>
>> tried adding "-m64" to BuildCommon.xml, with no luck, also tried
>> "-march=x86_64" (from /usr/bin/arch), and got:
>>
>>  "/home/gershon/haxelib/hxcpp/1,0//runtime/src/hxObject.cpp:1: error:  
>> bad
>> value (x86_64) for -mtune= switch"
>>
>> There's a couple more switches for 64bit platforms, like big\little  
>> endians
>> an others, but the -m64 usually does it.
>> Have'nt tried in a 32bit chroot, but will if you need it for testing...
>>
>> I'm on Linux 2.6.31-3-generic x86_64 GNU/Linux, gcc version 4.4.1  
>> (Ubuntu
>> 4.4.1-1ubuntu1)
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>>
>
> --
> haXe - an open source web programming language
> http://haxe.org



--
haXe - an open source web programming language
http://haxe.org