Skip to content

gollvm: build fail on slackware 14.2 in tools/gollvm/libgo/runtime_sysinfo.go #26405

@bcgraham

Description

@bcgraham

Please answer these questions before submitting your issue. Thanks!

What operating system and processor architecture are you using (go env)?

x86_64, slackware 14.2

What did you do?

In my build directory: cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -G "Unix Makefiles" ../llvm && make all -j4 but as far as I can tell, it just happens on my system regardless of other options when I build x86 (use gold linker, build with other targets, etc.)

What did you expect to see?

Successful build.

What did you see instead?

/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected ')'
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected '='
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected ';' or newline after top level declaration
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5965:36: use of undefined type 'ext'
make[2]: *** [tools/gollvm/libgo/CMakeFiles/libgotool.dir/build.make:1737: tools/gollvm/libgo/.pic/runtime.o] Error 3
make[1]: *** [CMakeFiles/Makefile2:15851: tools/gollvm/libgo/CMakeFiles/libgotool.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Those lines in runtime_sysinfo.go contain:

const ___glibc_clang_has_extension(ext) = 0
const ___glibc_clang_prereq(maj,min) = 0

A little investigation seemed to indicate these slipped through libgo/godumpspec/m{parser,tokenizer} because their bodies don't reference their parameters.

If I comment these lines out, and analogous lines in /[my-build-path]/tools/gollvm/libgo/sysinfo.go when building syscall, the build errors out while building libgo_shared because ld.gold can't find __morestack, -lgcc, crt1.o, etc. This part superficially has more in common with building gccgo. My binutils use gold, so even when I don't tell CMake to use gold, eventually it gets invoked. I am still investigating this latter part, but the above const/macro stuff seemed reportable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions