Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put into /tmp/ammer_${name} and looks in /tmp/ammer_libtypes #57

Open
0b1kn00b opened this issue Apr 7, 2023 · 3 comments
Open

Put into /tmp/ammer_${name} and looks in /tmp/ammer_libtypes #57

0b1kn00b opened this issue Apr 7, 2023 · 3 comments

Comments

@0b1kn00b
Copy link

0b1kn00b commented Apr 7, 2023

Unbuntu 22.10 Haxe 4.3.0 ammer-core-rewrite HEAD

I don't understand why the linker can't find string for one thing, but why is it looking in ammer_libtypes for lib.neko.o when it wrote it to ammer_aria2?
It seems the call that should generate lib.neko.so in ammer_aria2 isn't working

-main Main
-cp src/main/haxe
-D ammer.buildPath=tmp
-D ammer.outputPath=.local/bertha/i/pkg/aria2/lib/gnu
--no-output
-L stx
-L ammer
-neko test.n

src/main/eu/ohmrun/ammer/include

package eu.ohmrun.aria2.include;
@:ammer.lib.includePath("../../../../../../../vendor/aria2/src/includes/aria2/")
@:ammer.lib.headers.include("aria2.h")
class Aria2 extends ammer.def.Library<"aria2"> {
  public static function libraryInit():Int;
}

Error

mkdir /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes
mkdir /mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu
write /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.c (121221 characters)
compile object /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.c -> /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.o
run cc [-fPIC,-o,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.o,-c,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.c]
link library /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.o -> /mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu/ammer_libtypes.ndll
run cc [-m64,-o,/mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu/ammer_libtypes.ndll,-shared,-fPIC,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_libtypes/lib.neko.o,-lneko]
mkdir /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2
mkdir /mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu
write /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.c (4665 characters)
compile object /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.c -> /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.o
run cc [-fPIC,-o,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.o,-c,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.c,-I,/mnt/dat/i/prj/haxe/dev/aria2/vendor/aria2/src/includes/aria2]
link library /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.o -> /mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu/ammer_aria2.ndll
run cc [-m64,-o,/mnt/dat/i/prj/haxe/dev/aria2/.local/bertha/i/pkg/aria2/lib/gnu/ammer_aria2.ndll,-shared,-fPIC,/mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.o,-lneko,-laria2]
In file included from /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.c:116:
/mnt/dat/i/prj/haxe/dev/aria2/vendor/aria2/src/includes/aria2/aria2.h:38:10: fatal error: string: No such file or directory
   38 | #include <string>
      |          ^~~~~~~~
compilation terminated.
/usr/bin/ld: cannot find /mnt/dat/i/prj/haxe/dev/aria2/tmp/ammer_aria2/lib.neko.o: No such file or directory
/usr/bin/ld: cannot find -laria2: No such file or directory
collect2: error: ld returned 1 exit status
/mnt/dat/i/prj/haxe/published/stx_release/src/main/haxe/eu/ohmrun/pml/Module.hx:16: characters 33-64 : Warning : (WDeprecated) Usage of this field is deprecated
/mnt/dat/u/lib/haxe/tink_state/git/src/tink/state/Promised.hx:16: characters 21-34 : Warning : (WDeprecated) Use Promise.never() instea
@0b1kn00b
Copy link
Author

0b1kn00b commented Apr 7, 2023

It's possibly issues with the way the library is written. Closing for now.

@0b1kn00b 0b1kn00b closed this as completed Apr 7, 2023
@Aurel300 Aurel300 reopened this Apr 7, 2023
@Aurel300
Copy link
Owner

Aurel300 commented Apr 7, 2023

Looking at aria2.h, it is actually C++. There are some features here that I still need to implement, but compilation and linking should at least work if you add @:ammer.lib.language(Cpp)?

@0b1kn00b
Copy link
Author

0b1kn00b commented Apr 7, 2023

I've since gotten so far as getting a compile using that metadata. thanks for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants