Bug 239348 - [NEW PORT] lang/vlang: Simple, fast, safe, compiled language for developing maintainable software.
Summary: [NEW PORT] lang/vlang: Simple, fast, safe, compiled language for developing m...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
URL: https://reviews.freebsd.org/D21787
: 240300 (view as bug list)
Depends on:
Reported: 2019-07-20 16:59 UTC by Martin Filla
Modified: 2019-12-15 11:03 UTC (History)
6 users (show)

See Also:

vlang.shar (2.01 KB, text/plain)
2019-07-20 16:59 UTC, Martin Filla
no flags Details
vlang.shar (1.96 KB, text/plain)
2019-07-21 10:10 UTC, Martin Filla
no flags Details
vlang.shar (1.63 KB, text/plain)
2019-09-23 10:13 UTC, Martin Filla
no flags Details
vlang.shar (1.91 KB, text/plain)
2019-09-26 09:15 UTC, Martin Filla
no flags Details
vlang.shar (1.91 KB, text/plain)
2019-10-10 10:12 UTC, Martin Filla
no flags Details
vlang.shar (1.72 KB, text/plain)
2019-10-12 19:17 UTC, Martin Filla
freebsd: maintainer-approval+
vlang.shar (2.26 KB, text/plain)
2019-11-16 13:32 UTC, Martin Filla
no flags Details
vlang.shar (3.49 KB, text/plain)
2019-12-08 01:01 UTC, Martin Filla
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2019-07-20 16:59:15 UTC
Created attachment 205947 [details]

Simple, fast, safe, compiled language for developing maintainable software.
Comment 1 Mateusz Piotrowski freebsd_committer 2019-07-20 19:37:39 UTC
Hi there, thanks for the submission.

Please check your patch with portlint:
Comment 2 Martin Filla 2019-07-21 09:58:04 UTC
I am sorry
Comment 3 Martin Filla 2019-07-21 10:10:05 UTC
Created attachment 205966 [details]

Hi there, here you have new file.
Comment 4 Martin Filla 2019-08-15 22:51:23 UTC
Comment 5 Mateusz Piotrowski freebsd_committer 2019-08-16 11:03:40 UTC
The port does not build in a clean environment like poudriere because it attempts to use curl (which is not installed anyway) during the build phase. The problem is that there is no internet connection during build phase.

It should not be that hard to make it work but it might need setting ALL_TARGET to soemthing different or patching the makefile a little bit.

Also, I think I wonder if we could change PORTNAME to vlang as well.
Comment 6 Walter Schwarzenfeld freebsd_triage 2019-08-16 11:33:35 UTC
I think bin/v is also no good name, should also changed to bin/vlang
Comment 7 Mateusz Piotrowski freebsd_committer 2019-08-16 13:02:52 UTC
(In reply to Walter Schwarzenfeld from comment #6)

It is short, true. I'd stick to the defaults, however. If "v" the name for a compiler that the vlang community expects then it should be so. That's at least my opinion.
Comment 8 Martin Filla 2019-08-25 23:01:27 UTC
(In reply to Walter Schwarzenfeld from comment #6)
(In reply to Mateusz Piotrowski from comment #7)

Mateusz Piotrowski have true, because community expects short name "v" but i dont 
know what people from ports.
Comment 9 Tobias Kortkamp freebsd_committer 2019-09-03 12:19:46 UTC
*** Bug 240300 has been marked as a duplicate of this bug. ***
Comment 10 Lewis Cook freebsd_committer freebsd_triage 2019-09-03 12:51:08 UTC
Is there any follow-up regarding this port? I proposed a port earlier, which doesn't rely on curl as aforementioned above and was marked duplicate (never occurred to me to see if this port preexisted, I do apologize). Alternatively, it fetches both (the V compiler written in C then V-variation, the former being used to initially bootstrap the V-variant)—then built with the native compiler installed on the system. Although it doesn't fix the remaining issues of V itself, it's a step closer to V development on FreeBSD. Cheers!
Comment 11 Martin Filla 2019-09-03 15:43:36 UTC
(In reply to Lewis Cook from comment #10)
(In reply to Mateusz Piotrowski from comment #7)

I am working on port 

Comment 12 Martin Filla 2019-09-23 10:13:29 UTC
Created attachment 207733 [details]

Hi, last changes for port v language
Comment 13 Martin Filla 2019-09-24 22:55:17 UTC
(In reply to Mateusz Piotrowski from comment #1)

Hi there, look like this now ok ? :-)
Comment 14 Mateusz Piotrowski freebsd_committer 2019-09-25 12:34:51 UTC
The port does not build in a clean environment of poudriere:

===>  Building for v-0.1.20
gmake[1]: Entering directory '/wrkdirs/usr/ports/lang/vlang/work/v-0.1.20'
rm -rf vc/
git clone --depth 1 --quiet https://github.com/vlang/vc
gmake[1]: git: Command not found
gmake[1]: *** [Makefile:13: all] Error 127
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/vlang/work/v-0.1.20'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make: stopped in /usr/ports/lang/vlang
[00:00:11] Error: Build failed in phase: build
[00:00:11] Cleaning up
[00:00:11] Unmounting file systems
Comment 15 Mateusz Piotrowski freebsd_committer 2019-09-25 15:17:41 UTC
I've posted some improvements here: https://reviews.freebsd.org/D21787

I'd like the future maintainer to fix tests before vlang gets committed (be it Martin or Lewis).
Comment 16 Martin Filla 2019-09-26 09:14:12 UTC
(In reply to Mateusz Piotrowski from comment #15)
Hello Mateusz, 
I haven't access to reviews.freebsd.org but you have in makefile with CLAGS typing error. 
First problems are with CFLAGS. With flag -fstack-protector-strong vlang haven't problem 
but with -fno-strict-aliasing vlang crash to SIGABRT Signal 6.

Program received signal SIGABRT, Aborted.
0x000000080041e5da in kill () from /lib/libc.so.7
(gdb) t
[Current thread is 1 (LWP 101724 of process 65138)]
(gdb) bt
#0  0x000000080041e5da in kill () from /lib/libc.so.7
#1  0x000000080041e590 in ?? () from /lib/libc.so.7
#2  0x000000080041e500 in __stack_chk_fail () from /lib/libc.so.7
#3  0x000000000021b2fe in os__executable () at /vlang/work/vc-0.1.20/v.c:5079
#4  0x000000000023d32e in new_v (args=...) at /vlang/work/vc-0.1.20/v.c:12065
#5  0x000000000023c1f3 in main (argc=<optimized out>, argv=<optimized out>) at /vlang/work/vc-0.1.20/v.c:11164
(gdb) exit

Next complication are tests 
v-0.1.20/thirdparty/glfw/GLFW/glfw3.h:202:12: fatal error: 'GL/gl.h' file not found
  #include <GL/gl.h>

I will report this issues vlang developers.
Comment 17 Martin Filla 2019-09-26 09:15:06 UTC
Created attachment 207838 [details]
Comment 18 Martin Filla 2019-10-10 10:12:12 UTC
Created attachment 208224 [details]
Comment 19 Martin Filla 2019-10-12 16:03:15 UTC
Last report for this port
crypto.rand test failed bacause it's not implemented yet.
print_backtrace_skipping_top_frames is not implemented on this platform for now...
other all tests are ok.
Comment 20 Martin Filla 2019-10-12 19:17:04 UTC
Created attachment 208271 [details]
Comment 21 Martin Filla 2019-11-16 13:32:24 UTC
Created attachment 209184 [details]

New report from vlang port
Some issue with bad detect operationg system
Comment 22 Martin Filla 2019-12-08 01:00:04 UTC
(In reply to Mateusz Piotrowski from comment #15)
New progress with vlang language: 

Now is implement backtrace in v language
but still have bug in v language.
Issue is in create folder in root :-(, 
it have creates in /tmp
Comment 23 Martin Filla 2019-12-08 01:01:04 UTC
Created attachment 209781 [details]

update shar file, version port
Comment 24 Martin Filla 2019-12-08 01:06:23 UTC
(In reply to Mateusz Piotrowski from comment #15)

We have fix this issue

make test
/!\ v- Makefile warnings, please consider fixing /!\

Not validating first entry in CATEGORIES due to being outside of PORTSDIR.
Please ensure this is proper when committing.

===>  License MIT accepted by the user
===>   v- depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by v- for building
===>  Extracting for v-
=> SHA256 Checksum OK for vlang-v-
=> SHA256 Checksum OK for vlang-vc-1a86440_GH0.tar.gz.
===>  Patching for v-
===>  Applying FreeBSD patches for v-
===>   v- depends on executable: gmake - found
===>  Configuring for v-
===>  Building for v-
cc  -fstack-protector-strong  -std=gnu11 -lexecinfo -rdynamic -w -o vlang/work/v-7adda3b/v vlang/work/vc-1a86440/v.c
===>  Staging for v-
===>   Generating temporary packing list
install   -m 555 vlang/work/v-7adda3b/v vlang/work/stage/usr/local/bin
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
===>  Testing for v-
(cd vlang/work/v-7adda3b && ./v -g test v)
V panic: V tool "vlang/work/v-7adda3b/tools/vtest.v" could not be compiled
0x22761f <v_panic+0x2f> at vlang/work/v-7adda3b/v
0x2a43cc <compiler__get_vtmp_folder+0x14c> at vlang/work/v-7adda3b/v
0x286e69 <compiler__get_vtmp_filename+0x29> at vlang/work/v-7adda3b/v
0x285da6 <compiler__new_v+0x13c6> at vlang/work/v-7adda3b/v
0x2a7a5b <main__main+0xecb> at vlang/work/v-7adda3b/v
0x2a948f <main+0x5f> at vlang/work/v-7adda3b/v
V panic: Permission denied
0x22761f <v_panic+0x2f> at vlang/work/v-7adda3b/v
0x2a4812 <compiler__launch_tool+0x3f2> at vlang/work/v-7adda3b/v
0x2a6fa4 <main__main+0x414> at vlang/work/v-7adda3b/v
0x2a948f <main+0x5f> at vlang/work/v-7adda3b/v
*** Error code 1
Comment 25 Tobias Kortkamp freebsd_committer 2019-12-14 16:06:07 UTC
Port added in ports r517881 as lang/v by sunpoet@.
Comment 26 Martin Filla 2019-12-15 11:03:31 UTC
(In reply to Tobias Kortkamp from comment #25)
Some tests for vlang are bad.
I am worked on this port, why is maintainer @Sunpoet ?