Closed rudrabhoj closed 9 years ago
Where is the source of build.n?
Let's make good use of the search function in Github ;) https://github.com/HaxeFoundation/hxcpp/search?utf8=%E2%9C%93&q=%22Unknown+host+system%22&type=Code
While I am no regular user of github, that should have been obvious to me. sorry :P :P
So now I guess should search 'linux' in the repository and add FreeBSD option where ever necessary...
Where HX_WINDOWS, HX_LINUX, etc. are initially defined? I did search this time :P
Okay I edited all files wherever I find mention of linux and a need to add freebsd support to. But why do we need hxcpp to build hxcpp?
[agnis@bhagavati ~/Dev/hxcpp/project]$ neko build.n freebsd
Build freebsd, link=lib arch=m64
haxelib run hxcpp Build.xml -Dfreebsd -DHXCPP_M64 -Dstatic_link
Library hxcpp is not installed
#### Error building m64
FreeBSD currently don't have working hxcpp. If I had a working hxcpp then why would I compile from source:
[agnis@bhagavati ~/Dev/hxcpp/project]$ neko build.n freebsd
Build freebsd, link=lib arch=m64
haxelib run hxcpp Build.xml -Dfreebsd -DHXCPP_M64 -Dstatic_link
/usr/local/lib/neko/std.ndll: Undefined symbol "WIFEXITED"
#### Error building m64
This is what happens when I try compiling after install hxcpp through haxelib. How to build hxcpp without having hxcpp installed?
neko build.n
uses haxelib run hxcpp ...
, which calls the run.n
in hxcpp. That's why it complains if hxcpp is not installed.
To make it works, run haxelib dev hxcpp path/to/hxcpp
, which will use the given directory as the hxcpp haxelib, as if it is installed.
HX_*
are defined in the toolchain xml files, e.g. HX_WINDOWS
is defined in https://github.com/HaxeFoundation/hxcpp/blob/master/toolchain/msvc-toolchain.xml#L52
Hello, I set the checkout folder as hxcpp.
[agnis@bhagavati ~/Dev/hxcpp/project]$ neko build.n freebsd
Build freebsd, link=lib arch=m64
haxelib run hxcpp Build.xml -Dfreebsd -DHXCPP_M64 -Dstatic_link
This version of hxcpp (/usr/home/agnis/Dev/hxcpp/) appears to be a source/developement version.
Before this can be used, you need to:
1. Rebuild the main command-line tool, this can be done with:
cd tools/hxcpp
haxe compile.hxml
2. Build the binaries appropriate to your system(s), this can be done with:
cd project
neko build.n
I did haxe compile.hxml in tools/hxcpp, it went on smooth. Then I retired neko build.n and I get this error:
[agnis@bhagavati ~/Dev/hxcpp/project]$ neko build.n freebsd
Build freebsd, link=lib arch=m64
haxelib run hxcpp Build.xml -Dfreebsd -DHXCPP_M64 -Dstatic_link
/usr/local/lib/neko/std.ndll: Undefined symbol "WIFEXITED"
#### Error building m64
"WIFEXITED definitions: POSIX documents this in stdlib.h as optional, and is defined there on linux, but on FreeBSD it is not, so we need to include sys/wait.h where POSIX mandates it to be." -[1]
So given that issue is in std.ndll, I can assume this would be solved adding sys/wait.h in neko compilation?
You may probably want to discuss that in https://github.com/HaxeFoundation/neko/issues/84
Yes, that was the case. this wait.h issue as there in hxcpp too at some places, corrected them too. But in project/Build.xml, I am unable to translate this into FreeBSD version
<target id="linuxcompat" output="${LIBPREFIX}linuxcompat${LIBEXTRA}" tool="linker" toolid="${STD_MODULE_LINK}">
<files id="linuxcompat"/>
<builddir name="libs/linuxcompat"/>
<outdir name="${this_dir}/../${DESTDIR}/${BINDIR}"/>
</target>
I just copied it all mindlessly and wrote freebsdcompat, didn't went smooth, here's what i wrote:
<target id="freebsdcompat" output="${LIBPREFIX}freebsdcompat${LIBEXTRA}" tool="linker" toolid="${STD_MODULE_LINK}">
<files id="freebsdcompat"/>
<builddir name="libs/freebsdcompat"/>
<outdir name="${this_dir}/../${DESTDIR}/${BINDIR}"/>
</target>
During compilation it gives following error after compiling std
.........
.........
clang++ -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_FREEBSD -DSTATIC_LINK -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=0 -m64 -DHXCPP_M64 -I/usr/home/agnis/Dev/hxcpp/include -x c++ -frtti -Wno-invalid-offsetof /usr/home/agnis/Dev/hxcpp/project/libs/sqlite/sqlite.cpp -o/usr/home/agnis/Dev/hxcpp/project/libs/std/obj/freebsd64-stat/9133519a_sqlite.o
ar -cr /usr/home/agnis/Dev/hxcpp/lib/FreeBSD64/libsqlite.a @/usr/home/agnis/Dev/hxcpp/project/libs/std/obj/freebsd64-stat/all_objs
ar: warning: can't open file: @/usr/home/agnis/Dev/hxcpp/project/libs/std/obj/freebsd64-stat/all_objs: No such file or directory
ranlib /usr/home/agnis/Dev/hxcpp/lib/FreeBSD64/libsqlite.a
Error: Could not find filegroup freebsdcompat
#### Error building m64
What is a filegroup??
Okay I'll use Linux instead :P :/
Hello, I am trying to compile hxcpp for FreeBSD, but when I do I get the following error:
Neko and Haxe are working fine, I have done many tests with them, all are good. Also using Phaser extern for Haxe, which is working fine too.