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

ponyc --library failed #1881

Closed
jakwings opened this issue May 2, 2017 · 10 comments · Fixed by #1890
Closed

ponyc --library failed #1881

jakwings opened this issue May 2, 2017 · 10 comments · Fixed by #1890
Assignees

Comments

@jakwings
Copy link

jakwings commented May 2, 2017

// main.pony
actor @Foo
  new create() => None
$ ponyc -l
Building builtin -> /opt/pony/lib/pony/0.13.2-220d430/packages/builtin
Building . -> /Users/iology/test/foo
Generating
 Library reachability
 Selector painting
 Data prototypes
 Data types
 Function prototypes
 Functions
 Descriptors
src/libponyc/ast/ast.c:1614: ast_get_children: Assertion `parent != NULL` failed.

Backtrace:
  0   ponyc                               0x000000010efd95a1 ponyint_assert_fail + 161
  1   ponyc                               0x000000010eeff205 ast_get_children + 69
  2   ponyc                               0x000000010ef4343e emit_fun + 126
  3   ponyc                               0x000000010ef431c9 print_method + 57
  4   ponyc                               0x000000010ef4317d print_methods + 125
  5   ponyc                               0x000000010ef430e8 print_types + 328
  6   ponyc                               0x000000010ef42f32 genheader + 290
  7   ponyc                               0x000000010ef457c9 genlib + 73
  8   ponyc                               0x000000010ef2f045 codegen + 245
  9   ponyc                               0x000000010ef947e3 generate_passes + 51
  10  ponyc                               0x000000010eefaa41 compile_package + 161
  11  ponyc                               0x000000010eefa7ff main + 1103
  12  libdyld.dylib                       0x00007fff90f9d5ad start + 1
  13  ???                                 0x0000000000000002 0x0 + 2
Abort trap: 6
$ ponyc --version
0.13.2-220d430 [debug]
compiled with: llvm 3.9.0 -- Apple LLVM version 8.0.0 (clang-800.0.42.1)
@SeanTAllen
Copy link
Member

You have a compilation error. @foo should be Foo

However you should also get an error message not the assertion failure.

@jakwings
Copy link
Author

jakwings commented May 3, 2017

@SeanTAllen Hi, I was following the tutorial in this article: https://bluishcoder.co.nz/2015/12/16/c-linkable-libraries-with-pony.html

Without @ it will give Error: no C-API actors found in package 'foo'

@SeanTAllen
Copy link
Member

Note what is in the article is actor@ Foo which isn't what is in your code

@jakwings
Copy link
Author

jakwings commented May 3, 2017

Note what is in the article is actor@ Foo which isn't what is in your code

@SeanTAllen Oh, edited but that doesn't matter fow now. The result is still the same. :-P Is it only a problem on my side?

@SeanTAllen
Copy link
Member

Home now. Just tried, I have the issue as well.

@SeanTAllen
Copy link
Member

Header generated before death:

#ifndef pony_issue-1881_h
#define pony_issue-1881_h

/* This is an auto-generated header file. Do not edit. */

#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _MSC_VER
typedef struct __int128_t { uint64_t low; int64_t high; } __int128_t;
typedef struct __uint128_t { uint64_t low; uint64_t high; } __uint128_t;
#endif

@Praetonus
Copy link
Member

This is my bug, we shouldn't be emitting internal methods.

@SeanTAllen
Copy link
Member

@iology the fix for this will in 0.14.0 that is going to be released this weekend

@jakwings
Copy link
Author

jakwings commented May 5, 2017

Thanks. Successfully linked to the generated object file.

@SeanTAllen
Copy link
Member

Fix for this has been released as part of 0.14.0

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

Successfully merging a pull request may close this issue.

4 participants