Giter Site home page Giter Site logo

Comments (5)

hardillb avatar hardillb commented on June 11, 2024
golang:latest

apt-get update
# arm64 linux
apt-get install gcc-aarch64-linux-gnu libc6-dev-arm64-cross
# armv7 linux
apt-get install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
# armv6 linux
apt-get install gcc-arm-linux-gnueabihf libc6-dev-armel-cross libc6-dev-armhf-cross

#build for linux arm64
env GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc make

#build for amd64
env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 make

This might be useful for building MacOS on Linux
https://zig.news/kristoff/building-sqlite-with-cgo-for-every-os-4cic

# env GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 CC="zig cc -target aarch64-macos -I/usr/local/include" CXX="zig cc -target aarch64-macos -I/usr/local/include" make
Bulding for Linux
env CGO_CFLAGS="-I/usr/local/include -fPIC" go build -buildmode=c-archive go-auth.go
env CGO_LDFLAGS="-shared" go build -buildmode=c-shared -o go-auth.so
# github.com/iegomez/mosquitto-go-auth
/usr/local/go/pkg/tool/linux_amd64/link: running zig failed: exit status 1
warning: unsupported linker arg: -headerpad
warning: unsupported linker arg: 1144
warning: unsupported linker arg: -flat_namespace
warning: unsupported linker arg: -bind_at_load
warning(link): framework not found for '-framework CoreFoundation'
warning(link): framework not found for '-framework CoreFoundation'
warning(link): framework not found for '-framework Security'
warning(link): Framework search paths:
error(link): undefined reference to symbol '_SecTrustSetVerifyDate'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecTrustGetCertificateCount'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecTrustGetCertificateAtIndex'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecTrustEvaluateWithError'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecTrustCreateWithCertificates'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecPolicyCreateSSL'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecCertificateCreateWithData'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_SecCertificateCopyData'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFStringCreateWithBytes'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFStringCreateExternalRepresentation'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFRelease'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFErrorCopyDescription'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFDateCreate'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFDataGetLength'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFDataGetBytePtr'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFDataCreate'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFArrayGetValueAtIndex'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFArrayGetCount'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFArrayCreateMutable'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_CFArrayAppendValue'
error(link):   first referenced in '/tmp/go-link-582129748/go.o'
error(link): undefined reference to symbol '_mosquitto_client_id'
error(link):   first referenced in '/tmp/go-link-582129748/000002.o'
error(link): undefined reference to symbol '_mosquitto_client_username'
error(link):   first referenced in '/tmp/go-link-582129748/000002.o'
error: UndefinedSymbolReference

make: *** [Makefile:13: all] Error 2

from installer.

hardillb avatar hardillb commented on June 11, 2024

PR submitted to the mosquitto-go-auth project to build these.

If it's accepted then we don't need to build them, if now we can add the build script to part of our installer packaging build.

from installer.

hardillb avatar hardillb commented on June 11, 2024

All the Linux options are now being build by the upstream project, just got to fix the MacOS builds.

from installer.

ZJvandeWeg avatar ZJvandeWeg commented on June 11, 2024

@hardillb Should we close this issue and create a follow up issue for the Mac one?

from installer.

hardillb avatar hardillb commented on June 11, 2024

Upstream had a Git Token problem with the GH Action pushing the builds to the release page, so they haven't actually shipped any pre-built binaries yet. Said they didn't have time to look before Christmas.

We should open a follow up for the Mac builds and we should leave this in verify (and update the local install docs after) until upstream have fixed the token issue.

from installer.

Related Issues (17)

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.