Git Product home page Git Product logo

Comments (5)

gen2brain avatar gen2brain commented on July 23, 2024

So what is it, Centos or Alpine? What is the compiler in /home/opt/compiler, is it a musl gcc? It looks like you are trying to compile for musl using plain gcc. You have examples in issues of how to build for Alpine and Musl.

from go-fitz.

gen2brain avatar gen2brain commented on July 23, 2024

Right, so I just tested, you must use musl gcc if you want to build for musl, i.e:

go build -tags musl
# example
/usr/lib/go/pkg/tool/linux_amd64/link: running x86_64-pc-linux-gnu-gcc failed: exit status 1
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(buffer.o): in function `fz_new_buffer':
buffer.c:(.text.fz_new_buffer+0x47): undefined reference to `sigsetjmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(buffer.o): in function `fz_new_buffer_from_data':
buffer.c:(.text.fz_new_buffer_from_data+0x27): undefined reference to `sigsetjmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(buffer.o): in function `fz_new_buffer_from_base64':
buffer.c:(.text.fz_new_buffer_from_base64+0xeb): undefined reference to `sigsetjmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(colorspace.o): in function `fz_cached_color_convert':
colorspace.c:(.text.fz_cached_color_convert+0x9f): undefined reference to `sigsetjmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(colorspace.o): in function `fz_new_colorspace':
colorspace.c:(.text.fz_new_colorspace+0x6f): undefined reference to `sigsetjmp'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/milann/.cache/go/mod/github.com/gen2brain/[email protected]/libs/libmupdf_linux_amd64_musl.a(colorspace.o):colorspace.c:(.text.fz_new_icc_colorspace+0x76): more undefined references to `sigsetjmp' follow
collect2: error: ld returned 1 exit status
CC=x86_64-pc-linux-musl-gcc go build -tags musl
file example
example: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, Go BuildID=uBMxLYbblufj-uelQYGh/9CWUatp-5ceiXax-Q6BM/kfblecrTQjl1tydrm8--/6BbPjkjOoNv3cPP-LWK1, with debug_info, not stripped

from go-fitz.

BlackDogLi avatar BlackDogLi commented on July 23, 2024

So what is it, Centos or Alpine? What is the compiler in /home/opt/compiler, is it a musl gcc? It looks like you are trying to compile for musl using plain gcc. You have examples in issues of how to build for Alpine and Musl.

centos

from go-fitz.

BlackDogLi avatar BlackDogLi commented on July 23, 2024

could i use musl gcc for centos image. like RUN yum install -y gcc musl-dev ?

from go-fitz.

gen2brain avatar gen2brain commented on July 23, 2024

Sorry, no idea, try it.

from go-fitz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.