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

compile errors #1

Open
stutteringp0et opened this issue Jul 19, 2012 · 5 comments
Open

compile errors #1

stutteringp0et opened this issue Jul 19, 2012 · 5 comments

Comments

@stutteringp0et
Copy link

I've forked your project and made some modifications to get it to compile, but I'm not familiar enough with Dart to figure these out. I know it's been several months since you've updated it, but I hope you'll consider giving it a refresh.

This is where it's failing after my very slight modifications.

src/mod_dart.c: In function 'bool IsolateCreate(const char_, const char_, void_, char__)':
src/mod_dart.c:63:50: error: cannot convert 'Builtin::BuiltinLibraryId' to 'Dart_Handle {aka Dart_Handle}' for argument '1' to 'Dart_Handle* Dart_SetNativeResolver(Dart_Handle, Dart_NativeEntryResolver)'
src/mod_dart.c:64:45: error: cannot convert 'Builtin::BuiltinLibraryId' to 'Dart_Handle {aka Dart_Handle}' for argument '1' to 'Dart_Handle Dart_SetNativeResolver(Dart_Handle, Dart_NativeEntryResolver)'
src/mod_dart.c: In function 'void dart_child_init(apr_pool_t
, server_rec_)':
src/mod_dart.c:248:98: error: too few arguments to function 'bool Dart_Initialize(Dart_IsolateCreateCallback, Dart_IsolateInterruptCallback, Dart_IsolateShutdownCallback)'
/home/michael/dart/dart-repo/dart/runtime/include/dart_api.h:631:18: note: declared here
src/mod_dart.c: In function 'int dart_snapshots(apr_pool_t_, apr_pool_t_, apr_pool_t_, server_rec_)':
src/mod_dart.c:347:96: error: too few arguments to function 'bool Dart_Initialize(Dart_IsolateCreateCallback, Dart_IsolateInterruptCallback, Dart_IsolateShutdownCallback)'
/home/michael/dart/dart-repo/dart/runtime/include/dart_api.h:631:18: note: declared here
apxs:Error: Command failed with rc=65536

@stutteringp0et
Copy link
Author

I bypassed the Dart_Initialize error by adding a third argument 'NULL' to the function, and now I get errors on these two lines in the IsolateCreate function:

Dart_SetNativeResolver(Builtin::kBuiltinLibrary);
Dart_SetNativeResolver(Builtin::kIOLibrary);

src/mod_dart.c: In function 'bool IsolateCreate(const char_, const char_, void_, char__)':
src/mod_dart.c:63:50: error: cannot convert 'Builtin::BuiltinLibraryId' to 'Dart_Handle {aka Dart_Handle}' for argument '1' to '_Dart_Handle* Dart_SetNativeResolver(Dart_Handle, Dart_NativeEntryResolver)'
src/mod_dart.c:64:45: error: cannot convert 'Builtin::BuiltinLibraryId' to 'Dart_Handle {aka Dart_Handle}' for argument '1' to 'Dart_Handle Dart_SetNativeResolver(Dart_Handle, Dart_NativeEntryResolver)'
apxs:Error: Command failed with rc=65536

Again, the issue is - not enough arguments (I think).

Since Builtin:kBuiltinLibrary and Builtin:kIOLibrary aren't Dart_Handle types, what is the first argument supposed to be?

If I comment these lines, the module compiles - but fails to load with this error:
mod_dart.so: undefined symbol: __cxa_pure_virtual

@sam-mccall
Copy link
Owner

Apologies for the late response, I think this should be fixed now. (Mostly in d1fe3fc). The Dart APIs and development environments are a moving target (just upgraded to Mac OS 10.8), and I've been quite busy with work.

I added a shutdown callback, and switched to the new API for setting native resolvers following the example that introduced the change: https://chromiumcodereview.appspot.com/10532123/diff/14001/runtime/bin/main.cc?context=10&column_width=80

There also seems to be a new dependency within dart on a web_gen module within dart, which took some fiddling to get right.

Let me know whether this works for you!

@stutteringp0et
Copy link
Author

After updating to the latest dart version available, and updating your package to this latest update - I'm still getting:
undefined symbol: __cxa_pure_virtual

Searching that error gives not much insight into the problem...

I appreciate the update!

@stutteringp0et
Copy link
Author

the latest changes (switch to runtime directory) I'm getting the same issue....
mod_dart.so: undefined symbol: __cxa_pure_virtual

@stutteringp0et
Copy link
Author

As you mentioned, dart is a moving target (there's a pun in there somewhere). So maybe I should wait until it stabilizes instead of trying serverside right now.

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