vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.55k stars 2.15k forks source link

Make OpenBSD package #18251

Open Zectbumo opened 1 year ago

Zectbumo commented 1 year ago

Describe the bug

There is a needed dependency to run V on OpenBSD. Running V results in error: none of the paths ['/usr/local/lib/libgc.a', '/usr/lib/libgc.a'] exist

Expected Behavior

I expected "No libraries or dependencies needed." as stated on the homepage. It is true that it compiled with no libraries or dependencies but I expect it to run afterwards :D

Current Behavior

$ git clone https://github.com/vlang/v                                                                                                                                  
Cloning into 'v'...                                                                                                                                                                
remote: Enumerating objects: 145337, done.                                                                                                                                         
remote: Counting objects: 100% (9680/9680), done.                                                                                                                                  
remote: Compressing objects: 100% (640/640), done.                                                                                                                                 
remote: Total 145337 (delta 9200), reused 9215 (delta 9036), pack-reused 135657                                                                                                    
Receiving objects: 100% (145337/145337), 66.13 MiB | 9.31 MiB/s, done.                                                                                                             
Resolving deltas: 100% (103859/103859), done.                                                                                                                                      
Updating files: 100% (6551/6551), done.                                                                                                                                            
potato:/tmp$ cd v                                                                                                                                                                  
potato:/tmp/v$ make                                                                                                                                                                
if [ -f vc/v.c ] ; then git -C vc/ pull; else git clone --filter=blob:none https://github.com/vlang/vc vc/; fi                                                                     
Cloning into 'vc'...                                                                                                                                                               
remote: Enumerating objects: 23069, done.                                                                                                                                          
remote: Counting objects: 100% (348/348), done.                                                                                                                                    
remote: Compressing objects: 100% (348/348), done.                                                                                                                                 
remote: Total 23069 (delta 0), reused 323 (delta 0), pack-reused 22721                                                                                                             
Receiving objects: 100% (23069/23069), 3.37 MiB | 3.42 MiB/s, done.                                                                                                                
Resolving deltas: 100% (18/18), done.                                                                                                                                              
remote: Enumerating objects: 3, done.                                                                                                                                              
remote: Counting objects: 100% (3/3), done.                                                                                                                                        
remote: Compressing objects: 100% (3/3), done.                                                                                                                                     
remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0                                                                                                                       
Receiving objects: 100% (3/3), 911.23 KiB | 1.11 MiB/s, done.                                                                                                                      
Resolving deltas: 100% (1/1), done.                                                                                                                                                
Updating files: 100% (3/3), done.                                                                                                                                                  
cc -O2 -pipe  -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread                                                                                                                  
./v1 -no-parallel -o v2  cmd/v                                                                                                                                                     
./v2 -o v  cmd/v                                                                                                                                                                   
rm -rf v1 v2                                                                                                                                                                       
V has been successfully built                                                                                                                                                      
./v run ./cmd/tools/detect_tcc.v                                                                                                                                                   
V panic: >> error: none of the paths ['/usr/local/lib/libgc.a', '/usr/lib/libgc.a'] exist                                                                                          
v hash: 099d4fc                                                                                                                                                                    
*** Error 1 in /tmp/v (Makefile:19 'v')                                                                                                                                            

Reproduction Steps

git clone https://github.com/vlang/v
cd v
make

Possible Solution

I read on #17192 that this makes it work: # pkg_add boehm-gc

also, Possibly make an OpenBSD package so we can: pkg_add v

Additional Information/Context

No response

V version

V 0.3.4 099d4fc

Environment details (OS name and version, etc.)

OpenBSD 7.3 amd64

betabrain commented 1 year ago

+1 I am playing with V on OpenBSD 7.3 (amd64) myself, and can confirm both the problem and the solution in https://github.com/vlang/v/discussions/17192.

JalonSolov commented 1 year ago

I think it is still too early to create an official V package (for any platform). At the rate V is still changing, it would be a tremendous amount of effort to keep packages updated.

Perhaps when V reaches v1.0, but not yet.

Zectbumo commented 1 year ago

At the rate V is still changing

https://vlang.io/compare "V is not going to change much, if at all."

Maybe this page needs an update?

JalonSolov commented 1 year ago

No. It is referring to after 1.0, and mainly means the syntax won't change, not that V won't still get bug fixes.

Zectbumo commented 1 year ago

at the vary least can we add a pkg_add boehm-gc heads-up instructions for OpenBSD users on the documentation page? https://github.com/vlang/v/blob/master/doc/docs.md#installing-v-from-source

jasperla commented 6 months ago

There is an OpenBSD port for v now. If you're on OpenBSD -current, you can pkg_add v pretty soon after new snapshots have been built, or you can build it yourself from lang/v.

felipensp commented 6 months ago

There is an OpenBSD port for v now. If you're on OpenBSD -current, you can pkg_add v pretty soon after new snapshots have been built, or you can build it yourself from lang/v.

Many thanks!