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

Install tarball links both point to non-bundled archive #880

Open
hholst80 opened this issue Dec 21, 2024 · 5 comments · May be fixed by #881
Open

Install tarball links both point to non-bundled archive #880

hholst80 opened this issue Dec 21, 2024 · 5 comments · May be fixed by #881

Comments

@hholst80
Copy link

Bug Report

I am running a custom LFS based distro and I downloaded crystal lang from the download page as a bundle:

https://github.com/crystal-lang/crystal/releases/download/1.14.0/crystal-1.14.0-1-linux-x86_64.tar.gz

I unpacked the tar ball under /usr/local

# crystal -v
Crystal 1.14.0 [dacd97bcc] (2024-10-09)

LLVM: 18.1.6
Default target: x86_64-unknown-linux-gnu

I see that /usr/local/lib/crystal contains a single file libgc.a

My program:

# cat src/cr.cr 
# TODO: Write documentation for `Cr`
module Cr
  VERSION = "0.1.0"

  # TODO: Put your code here
  puts "Hello World!"
end

I tried to run it:

# crystal run src/cr.cr
/usr/bin/ld: cannot find -levent (this usually means you need to install the development package for libevent): No such file or directory
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /root/.cache/crystal/crystal-run-cr.tmp  -rdynamic -L/usr/local/bin/../lib/crystal -lgc -lpthread -levent -lrt -lpthread -ldl

This is due to libevent.a missing in /usr/local/lib/crystal. Is it expected to be on the host? In what sense is the download a bundle?

I assumed that a download would contain its own dependencies to be able to generate ready-to-run binaries. ld is fairly fundamental but so far I have installed +200 packages without needing libevent in any form or shape so its not indispensable.

@Blacksmoke16
Copy link
Member

Blacksmoke16 commented Dec 21, 2024

Related: https://crystal-lang.org/2024/11/05/lifetime-event-loop/

Could try installing the latest nightly release where you shouldn't need libevent at all. At least until the stable version is released in a few weeks.

EDIT: It seems the archive you linked isn't the bundled one. I just downloaded https://github.com/crystal-lang/crystal/releases/download/1.14.0/crystal-1.14.0-1-linux-x86_64-bundled.tar.gz and it has libevent.a libevent_pthreads.a libgc.a libpcre2-8.a?

@Blacksmoke16 Blacksmoke16 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2024
@hholst80
Copy link
Author

@Blacksmoke16 It seems the download link I followed both referred to the same file?

They are the same, so I guess I did not download the bundled version? Who can we ping to update the download links?

@Blacksmoke16
Copy link
Member

No, they for sure point to diff archives:

They're very similar but the latter has that -bundled suffix.

@hholst80
Copy link
Author

Not on my firefox.... strange.

https://crystal-lang.org/install/#linux

This is the link you open? I did a reload... for sure they point to the same file (the non-bundle).

image

@Blacksmoke16
Copy link
Member

Ooo no, I was grabbing the links directly off the GH release. I'll re-open this and transfer it to the correct repo. Thanks!

@Blacksmoke16 Blacksmoke16 reopened this Dec 26, 2024
@Blacksmoke16 Blacksmoke16 transferred this issue from crystal-lang/crystal Dec 26, 2024
@Blacksmoke16 Blacksmoke16 changed the title Include libevent.a as part of bundle Install tarball links both point to non-bundled archive Dec 26, 2024
@straight-shoota straight-shoota linked a pull request Dec 26, 2024 that will close this issue
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.

2 participants