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

build: change to the default build method that uses a shared library #277

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

zemyblue
Copy link
Member

@zemyblue zemyblue commented Sep 19, 2023

Description

When building with make build, change the default build method so that it is built as a binary that uses a shared library.
However, we can build a single binary as a static library using the command make build LINK_STATICALLY=true.

closes: #276

Motivation and context

A single binary build using static library failed in Ubuntu.
And there is not fix way because wasmvm static library use mucl static library.

How has this been tested?

  1. make build
  2. check the build binary in the ./build/ directory
  3. check linked libraries as using ldd ./build/fnsad.
$ ldd ./build/fnsad 
        linux-vdso.so.1 (0x00007fff68001000)
        libwasmvm.x86_64.so => /home/zemyblue/go/pkg/mod/github.com/!finschia/wasmvm@v1.1.1-0.11.4-rc1/internal/api/libwasmvm.x86_64.so (0x00007f904b800000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f904b400000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f904b7dd000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f904bdb5000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f904b7d5000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f904b6ed000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f904b6e5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f904bdcd000)

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.

Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue self-assigned this Sep 19, 2023
@zemyblue zemyblue added this to the v2.0.0 milestone Sep 19, 2023
Signed-off-by: zemyblue <zemyblue@gmail.com>
Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue linked an issue Sep 19, 2023 that may be closed by this pull request
4 tasks
@zemyblue zemyblue changed the title build: change the default build binary to use shared library build: change to the default build method that uses a shared library Sep 20, 2023
Signed-off-by: zemyblue <zemyblue@gmail.com>
@zemyblue zemyblue marked this pull request as ready for review September 20, 2023 02:22
Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Copy link
Member

@tkxkd0159 tkxkd0159 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zemyblue zemyblue merged commit a450fb9 into Finschia:rc/v2.0.0-rcx Sep 21, 2023
33 checks passed
@zemyblue zemyblue deleted the feat/make_build branch September 21, 2023 09:36
@zemyblue zemyblue mentioned this pull request Oct 19, 2023
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 this pull request may close these issues.

build fails with make build in Ubuntu
3 participants