Skip to content

shared library version should be optional #2230

Closed

Description

@daurnimator

Not all shared libraries should have a version; the version parameter to addSharedLibrary in the zig build system should be optional.

Activity

  1. added this to the 0.5.0 milestone on Apr 10, 2019
  2. added
    proposal
    on Apr 10, 2019
  3. modified the milestones: 0.5.0, 0.6.0 on Sep 20, 2019
  4. added
    zig build system
    on Nov 6, 2019
  5. added
    accepted
    on Nov 27, 2019
  6. andrewrk commented on Nov 27, 2019

    @andrewrk
    Member

    Let's make it a tagged union, so that at least people are encouraged to choose to not have a version, vs that being the default.

  7. added
    breaking
    contributor friendly
    standard library
    on Nov 27, 2019
  8. modified the milestones: 0.6.0, 0.7.0 on Nov 27, 2019
  9. waruqi commented on Jul 9, 2020

    @waruqi

    I also very much hope there is a way to remove '0.0.0' from the dynamic library file name.

    on linux:

    generate libtest.so.0.0.0 and lld test -> libtest.so.0 not found! oh, no..

    on macOS

    generate libtest.0.0.0.dylib. I also cannot link -ltest.

    for example

    [ 37%]: ccache compiling.release src/main.zig
    /usr/local/bin/zig build-obj --release-fast --output-dir build/.objs/test/macosx/x86_64/release/src --name main.zig src/main.zig
    [ 50%]: ccache compiling.release src/test.zig
    /usr/local/bin/zig build-obj --release-fast -fPIC --output-dir build/.objs/testlib/macosx/x86_64/release/src --name test.zig src/test.zig
    [ 62%]: linking.release libtestlib.dylib
    /usr/local/bin/zig build-lib --strip -dynamic -fPIC --output-dir build/macosx/x86_64/release --name testlib --object build/.objs/testlib/macosx/x86_64/release/src/test.zig.o
    [ 87%]: linking.release test
    /usr/local/bin/zig build-exe -Lbuild/macosx/x86_64/release -rpath @loader_path --strip -ltestlib --output-dir build/macosx/x86_64/release --name test --object build/.objs/test/macosx/x86_64/release/src/main.zig.o
    error: lld: error: Unable to find library for -ltestlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedbreakingcontributor friendlyproposalstandard libraryzig build system

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions