Skip to content

Build with MinGW? #12

@FF-AntiK

Description

@FF-AntiK

Is it possible to build go-exprtk with MinGW?
I've tried:
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 GOOS=windows go build
which results in:

96.25 # github.com/Pramod-Devireddy/go-exprtk
96.25 /usr/bin/x86_64-w64-mingw32-as: $WORK/b179/_x003.o: too many sections (72935)
96.25 /tmp/ccIq6ph4.s: Assembler messages:
96.25 /tmp/ccIq6ph4.s: Fatal error: can't write 19 bytes to section .text of $WORK/b179/_x003.o: 'file too big'
96.25 /usr/bin/x86_64-w64-mingw32-as: $WORK/b179/_x003.o: too many sections (72935)
96.25 /tmp/ccIq6ph4.s: Fatal error: $WORK/b179/_x003.o: file too big

So I tried to use the big-obj format:
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_CFLAGS="-Wa,-mbig-obj" CGO_ENABLED=1 GOOS=windows go build
which results in:

0.842 # github.com/Pramod-Devireddy/go-exprtk
0.842 cgo: cannot parse gcc output $WORK/b179//_cgo_.o as ELF, Mach-O, PE, XCOFF object
0.883 # github.com/mattn/go-sqlite3
0.883 cgo: cannot parse gcc output $WORK/b181//_cgo_.o as ELF, Mach-O, PE, XCOFF object

After a little research, I found out that actually cgo's debug/pe doesn't support the big-obj format:
golang/go#24341

Is there any other way to build this for Windows?
All I want is an executable which runs on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions