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

Build command fails on Ubuntu Linux #4

Open
patham9 opened this issue Sep 28, 2023 · 4 comments
Open

Build command fails on Ubuntu Linux #4

patham9 opened this issue Sep 28, 2023 · 4 comments

Comments

@patham9
Copy link

patham9 commented Sep 28, 2023

While apt-get install stalin works, building from source on Ubuntu does not:

^^^^Starting command^^^^
./setjmp_test
This appears to be a X86_64 running LINUX
Stack appears to grow down, which is the default.
A good guess for STACKBOTTOM on this machine is 0x7fffef6d9000.
Note that this may vary between machines of ostensibly
the same architecture (e.g. Sun 3/50s and 3/80s).
On many machines the value is not fixed.
A good guess for ALIGNMENT on this machine is 8.
Generic mark_regs code may work
./gctest
Segfault at 0x0
Unexpected bus error or segmentation fault
Makefile:605: recipe for target 'KandRtest' failed
make: *** [KandRtest] Aborted
Cannot (yet) run Stalin on this architecture
@patham9 patham9 changed the title Build command fails on Linux Build command fails on Ubuntu Linux Sep 28, 2023
@bret-walda
Copy link

I am probably very late to this but you can actually get past this error and make the executable for your architecture here is how i did that:

  1. Added the -std=gnu89 flag to the gc-Makefile.sed make sure to just add it to the CFLAGS after the pipe.
  2. cd into include there will be a script called stalin-architecture-name if you run it, it will return unknown which is causing the "Cannot (yet) run Stalin on this architecture". edit it and add copy a previous command like i[3456]86 echo"IA32" to x86_64 echo "arch-amd64" so that the the script now return arch-amd64.
  3. if you have a working stalin executable you can make the arch-amd64.c file by first running make stalin-architecture which will make an executable in your current dir now if you run /.stalin-architecture arch-amd64, now it will output the values for your current architecture copy them and paste them in the stalin.architecutres in the include folder.
  4. now make the entry for arch-amd64 into the makefile just copy an already existing entry for an arch like IA32 and replace the IA32 related entries to arch-amd64 now run make stalin-arch-amd64.c if everything went fine it will create a stalin-arch-amd64.c into your current dir now just run build and it will make stalin for your current arch from source.
  5. if by chance you already dont have a working stalin available go to the ubuntu packages search for stalin they already have a pre-built amd64.c copy that into your source dir and run build hopefully this helps on debian.

Sadly i am not on debian and i tried to use their amd64.c prebuilt source file for arch linux i was able to compile stalin but i failed the ./gctest and when i run stalin i just get zsh: segmentation fault (core dumped) ./stalin
can anyone help me on arch linux.

@barak
Copy link
Owner

barak commented Oct 9, 2024

Please file a Debian bug (bugs.debian.org) so this doesn't fall between the cracks.

I'll try to have a look at it. Patches welcome!

@bret-walda
Copy link

Please file a Debian bug (bugs.debian.org) so this doesn't fall between the cracks.

I'll try to have a look at it. Patches welcome!

Can i file a debian bug report if i am not on debian. building from source on arch is giving me the problem i think it is because the ./gctest fails i have tried running the ./gctest in gdb an i get this:

Program received signal SIGSEGV, Segmentation fault.
0x000055555555e709 in GC_push_all_eager ()
(gdb) bt
#0  0x000055555555e709 in GC_push_all_eager ()
#1  0x000055555555e774 in GC_push_all_stack_partially_eager ()
#2  0x000055555555cc39 in GC_push_current_stack ()
#3  0x0000555555562e7d in GC_with_callee_saves_pushed ()
#4  0x0000555555562ed4 in GC_generic_push_regs ()
#5  0x000055555555cd15 in GC_push_roots ()
#6  0x000055555555eef3 in GC_mark_some ()
#7  0x00005555555575b4 in GC_stopped_mark ()
#8  0x0000555555557a5b in GC_try_to_collect_inner ()
#9  0x000055555555b73e in GC_init_inner ()
#10 0x000055555555b835 in GC_enable_incremental ()
#11 0x00005555555570f6 in main ()

I don't really know what to do next from here.

@barak
Copy link
Owner

barak commented Oct 9, 2024

Can i file a debian bug report if i am not on debian. building from source on arch is giving me the problem

Well, you can. Whether you should is another question.

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

3 participants