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

Error building gerbil #78

Closed
jeback1 opened this issue May 6, 2018 · 11 comments
Closed

Error building gerbil #78

jeback1 opened this issue May 6, 2018 · 11 comments

Comments

@jeback1
Copy link

jeback1 commented May 6, 2018

Fresh install of gambit (v4.8.9); all 14 checks completed successfully.
When building gerbil on Fedora Linux 27:
... compile debug/heap
In file included from heap__0.c:352:0:
heap__0.c: In function ‘___H_heap____0’:
heap__0.c:11295:54: error: ‘___BODY_OFS’ undeclared (first use in this function); did you mean ‘___BODY_AS’?
___SCMOBJ next = ___TAG((base + ___STILL_HAND_OFS - ___BODY_OFS),
^
/usr/local/Gambit/include/gambit.h:1683:34: note: in definition of macro ‘___CAST’
#define ___CAST(type,val)((type)(val))
^~~
heap__0.c:11295:19: note: in expansion of macro ‘___TAG’
___SCMOBJ next = ___TAG((base + ___STILL_HAND_OFS - ___BODY_OFS),
^~~~~~
heap__0.c:11295:54: note: each undeclared identifier is reported only once for each function it appears in
___SCMOBJ next = ___TAG((base + ___STILL_HAND_OFS - ___BODY_OFS),
^
/usr/local/Gambit/include/gambit.h:1683:34: note: in definition of macro ‘___CAST’
#define ___CAST(type,val)((type)(val))
^~~
heap__0.c:11295:19: note: in expansion of macro ‘___TAG’
___SCMOBJ next = ___TAG((base + ___STILL_HAND_OFS - _BODY_OFS),
^~~~~~
*** ERROR IN ##main -- target compilation or link failed while compiling "/home/k/src/gerbil/lib/std/debug/heap__0.scm"
*** ERROR IN gxc#compile-scm-file
% -- Syntax Error
*** ERROR IN ?
--- Syntax Error at compile: Compilation error; gsc exit with nonzero status
... form: "/home/k/src/gerbil/lib/std/debug/heap__0.scm"
... detail: 17920
*** ERROR; build failed
[k@grisea src]$ ls

@vyzo
Copy link
Collaborator

vyzo commented May 6, 2018

hrm, interesting. how is your gambit configured?

@jeback1
Copy link
Author

jeback1 commented May 6, 2018

The only flag was --enable-single-host. I ran configure as: ./configure --enable-single-host
Would the --enable-debug flag be relevant here?

@vyzo
Copy link
Collaborator

vyzo commented May 6, 2018

I can't reproduce it locally, you might want to just comment out debug/heap from std/build.ss for now.

@Negdayen
Copy link

Negdayen commented May 6, 2018

Receiving this same error.

$ uname -a
Linux xubuntu 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Configured Gambit 4.8.9 (commit edac3c75f0d93f4f56a39c2b90621511f096dd72) with:
./configure --enable-shared --enable-multiple-versions --enable-absolute-shared-libs --enable-sharp-dot

@vyzo
Copy link
Collaborator

vyzo commented May 6, 2018

interesting, not sure what's up.

@fare care to take a look and try to reproduce on nixOS?

@vyzo
Copy link
Collaborator

vyzo commented May 6, 2018

Also, can you try with Gambit from master?

@fare
Copy link
Collaborator

fare commented May 6, 2018

Yes, I can reproduce on NixOS, after updating gambit to 4.8.9-41-gedac3c75, gerbil to 0.13-DEV-431-gd28ecaf3:

... compile debug/heap
In file included from heap__0.c:352:0:
heap__0.c: In function '___H_heap____0':
heap__0.c:11295:54: error: '___BODY_OFS' undeclared (first use in this function); did you mean '___BODY_AS'? 
  ___SCMOBJ next = ___TAG((base + ___STILL_HAND_OFS - ___BODY_OFS),
                                                      ^
heap__0.c:11295:54: note: each undeclared identifier is reported only once for each function it appears in
*** ERROR; build failed
builder for ‘/nix/store/xafjknf4cil2i60f2lndgv68cc86qmk7-gerbil-unstable-2018-05-01.drv’ failed with exit code 1
error: build of ‘/nix/store/xafjknf4cil2i60f2lndgv68cc86qmk7-gerbil-unstable-2018-05-01.drv’ failed

@vyzo
Copy link
Collaborator

vyzo commented May 6, 2018

ok, something broke. Anyone mind #ifndef/define ____BODY_OFS?

@vyzo vyzo added the bug label May 6, 2018
@fare
Copy link
Collaborator

fare commented May 6, 2018

Looks like ___BODY_OFS disappeared in this recent Gambit commit:
gambit/gambit@4c4addd

@vyzo
Copy link
Collaborator

vyzo commented May 7, 2018

hrm, this affects more places in the ffi -- ___HEADER seems to have been replaced by ___SUBTYPED_HEADER.

@vyzo
Copy link
Collaborator

vyzo commented May 7, 2018

Seems like it's simply a matter of defining ___BODY_OFS as needed for now; see #79.

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

No branches or pull requests

4 participants