Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719736 - dev-lang/zig-0.6.0 version bump
Summary: dev-lang/zig-0.6.0 version bump
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Aisha Tammy
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-04-27 06:00 UTC by Anton Kochkov
Modified: 2021-03-04 18:03 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zig 0.7.0 version bump (zig-0.7.0.ebuild,1.59 KB, text/plain)
2020-11-12 21:12 UTC, Michel Ganguin
Details
build and install lld-11 shared libraries (zig-lld11-shared.patch,591 bytes, patch)
2020-11-12 21:14 UTC, Michel Ganguin
Details | Diff
add missing lld-11 dependency (zig-0.7.0.ebuild,1.60 KB, text/plain)
2020-11-12 22:35 UTC, Michel Ganguin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kochkov 2020-04-27 06:00:15 UTC
Zig 0.6.0 was released at April 14, 2020:

https://github.com/ziglang/zig/releases/tag/0.6.0

This release of Zig upgrades to LLVM 10. Zig operates in lockstep with LLVM; Zig 0.6.0 is not compatible with LLVM 9. 

Amount of changes is tremendous, see full release notes at https://ziglang.org/download/0.6.0/release-notes.html

Many distributions already did an upgrade: https://repology.org/project/zig/versions
Comment 1 Michel Ganguin 2020-05-08 17:46:02 UTC
I tried to version bump, but I get multiple errors:

* linker issues lar to https://github.com/ziglang/zig/issues/4799, I added -DZIG_PREFER_CLANG_CPP_DYLIB=ON to the cmake args
* zig used to embed lld, it does not anymore. Therefore it depends on system lld. However, gentoo's lld does not include static libraries needed by zig. I tweaked the lld ebuild to install them.
* zig0 now compile, but fails at runtime "CommandLine Error: Option 'mc-relax-all' registered more than once", according to upstream, it's due to a double import of functions, dynlib conflicting with static lib (also in https://github.com/ziglang/zig/issues/4799). I did not find a fix/workaround for that.

I tried both with gcc and clang 10, same results.
Comment 2 Anton Kochkov 2020-08-07 06:17:23 UTC
Looks like it have to wait for LLVM 11 and Zig 0.7.0 https://github.com/ziglang/zig/milestone/9 - the planned release date is September 28, 2020.
Comment 3 Sam James archtester gentoo-dev Security 2020-10-10 14:53:41 UTC
@Nick, ping.
Comment 4 Sam James archtester gentoo-dev Security 2020-11-03 02:53:44 UTC
(In reply to Sam James from comment #3)
> @Nick, ping.

ping
Comment 5 Michel Ganguin 2020-11-12 21:12:12 UTC
Created attachment 671164 [details]
zig 0.7.0 version bump

newly released 0.7.0 version, targetting llvm11.

builds using -DZIG_PREFER_CLANG_CPP_DYLIB=ON

requires sys-devel/lld/lld-11.0.0.ebuild to be patched to build shared libraries. see provided patch.

The build requires quite some RAM about 6GB during my tests.
Comment 6 Michel Ganguin 2020-11-12 21:14:32 UTC
Created attachment 671167 [details, diff]
build and install lld-11 shared libraries

patch sys-devel/lld/lld-11.0.0.ebuild to build and install shared libraries required by >=dev-lang/zig-0.7.0
Comment 7 Michel Ganguin 2020-11-12 22:35:04 UTC
Created attachment 671182 [details]
add missing lld-11 dependency
Comment 8 Jan Ziak (atomsymbol) 2021-01-08 01:47:38 UTC
Hi. I would like to proxy-maintain this package. The most recent release is Zig 0.7.1, which builds OK using the ebuilds attached to this bug.
Comment 9 Sam James archtester gentoo-dev Security 2021-01-08 01:55:30 UTC
(In reply to Jan Ziak (atomsymbol) from comment #8)
> Hi. I would like to proxy-maintain this package. The most recent release is
> Zig 0.7.1, which builds OK using the ebuilds attached to this bug.

It's probably worth speaking to Miguel too, as he wrote these ebuilds

(In reply to Michel Ganguin from comment #5)
> Created attachment 671164 [details]
> zig 0.7.0 version bump
> 
> newly released 0.7.0 version, targetting llvm11.
> 
> builds using -DZIG_PREFER_CLANG_CPP_DYLIB=ON
> 
> requires sys-devel/lld/lld-11.0.0.ebuild to be patched to build shared
> libraries. see provided patch.
> 
> The build requires quite some RAM about 6GB during my tests.

Could you supply a git am-able patch with GCO sign off, but ideally a GitHub PR?

I think we may need to speak to mgorny about whether he's happy with the LLD patch. IIRC upstream were unsure about it.
Comment 10 Sam James archtester gentoo-dev Security 2021-01-08 01:55:49 UTC
(In reply to Sam James from comment #9)
> (In reply to Jan Ziak (atomsymbol) from comment #8)
> > Hi. I would like to proxy-maintain this package. The most recent release is
> > Zig 0.7.1, which builds OK using the ebuilds attached to this bug.
> 
> It's probably worth speaking to Miguel too, as he wrote these ebuilds
> 

Sorry, Michel *.
Comment 11 Jan Ziak (atomsymbol) 2021-01-08 02:01:12 UTC
(In reply to Sam James from comment #9)
> Could you supply a git am-able patch with GCO sign off, but ideally a GitHub
> PR?
> 
> I think we may need to speak to mgorny about whether he's happy with the LLD
> patch. IIRC upstream were unsure about it.

I will try to submit a GitHub PR, with a modified LLD ebuild that adds a "shared" USE flag (unless somebody has a better suggestion).
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-08 09:22:38 UTC
Don't waste your time.  I'm not going to accept any LLD patch that hasn't been accepted upstream.
Comment 13 Jan Ziak (atomsymbol) 2021-01-08 11:43:48 UTC
(In reply to Michał Górny from comment #12)
> Don't waste your time.  I'm not going to accept any LLD patch that hasn't
> been accepted upstream.

I meant lld.ebuild patch - not lld source code patch. Are you going to accept such a patch?
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-08 12:30:26 UTC
Does it actually resolve the problem?  Last I've tried, it failed hard due to double initialization or sth like that.
Comment 15 Jan Ziak (atomsymbol) 2021-01-08 13:05:40 UTC
(In reply to Michał Górny from comment #14)
> Does it actually resolve the problem?  Last I've tried, it failed hard due
> to double initialization or sth like that.

It (== https://bugs.gentoo.org/attachment.cgi?id=671167&action=diff) resolves the problem of /usr/lib64/liblld*.so and /usr/include/lld/*/*.h files not being installed, if that is what you mean.

As I mentioned earlier, we can either introduce a "shared" USE flag to lld.ebuild or make lld.ebuild install the libs+includes by default - whichever option you prefer.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-08 13:17:26 UTC
Sure but last time I've tried, I wasn't able to start zig with this.