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

[gollvm]: Assertion `llvm::sys::path::is_absolute(executable)' failed during compilation of StreamSets Data Collector Edge #40994

Closed
advancedwebdeveloper opened this issue Aug 23, 2020 · 3 comments

Comments

@advancedwebdeveloper
Copy link

@advancedwebdeveloper advancedwebdeveloper commented Aug 23, 2020

What version of Go are you using (go version)?

$/tmp/workspace/clang_debug/bin/llvm-goc --version
gollvm version 1 (experimental) [LLVM version 12]
$/tmp/workspace/clang_debug/tools/gollvm/gotools/cgo -V
cgo version go1.14.6 gollvm LLVM 12.0.0git

Does this issue reproduce with the latest release?

I didn't build gollvm for Golang 1.15 - so not sure (yet).

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

Ubuntu 20 x86_64$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz Output
$ go env

What did you do?

Well, I took my debug build (cause I was not able to use my release build https://drive.google.com/file/d/1g-poP_5C_BaeUWPD9eIvFNCfnl28yjH9/view?usp=sharing using https://go.googlesource.com/gollvm/#using instructions - so I took my debug release https://drive.google.com/file/d/1g8vk15zX944li6Qzg_BLPUG9OFGfOqvQ/view?usp=sharing .

It was compile using
$cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD="X86;ARM;RISCV;AArch64" -G Ninja ../llvm-project/llvm
I am not targeting 3rd party back-ends, for now - but enabled those, to ensure that it would compile.

Exporting PATH and LD_LIBRARY_PATH did the trick - but I wasn't using enforced installation target (for Ninja).

I was trying to compile (file-by-file) the source code of StreamSets Data Collector Edge .

$ git clone https://github.com/streamsets/datacollector-edge

Cloning into 'datacollector-edge'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 6439 (delta 25), reused 13 (delta 0), pack-reused 6401
Receiving objects: 100% (6439/6439), 5.53 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (4123/4123), done.

ubuntu@ubuntu:/media/ubuntu/b23fdd4f-ed60-4566-85e3-d738616745c5$
ubuntu@ubuntu:/media/ubuntu/b23fdd4f-ed60-4566-85e3-d738616745c5/datacollector-edge$ llvm-goc main.go

main.go:16:12: error: import file 'crypto/tls' not found
main.go:17:6: error: import file 'flag' not found
main.go:18:5: error: import file 'fmt' not found
main.go:19:30: error: import file 'github.com/kardianos/service' not found
main.go:20:2: error: import file 'github.com/sirupsen/logrus' not found
main.go:21:23: error: import file 'github.com/spf13/cast' not found
main.go:22:59: error: import file 'github.com/streamsets/datacollector-edge/container/common' not found
main.go:23:63: error: import file 'github.com/streamsets/datacollector-edge/container/controlhub' not found
main.go:24:57: error: import file 'github.com/streamsets/datacollector-edge/container/edge' not found
main.go:25:2: error: import file 'github.com/streamsets/datacollector-edge/stages/destinations' not found
main.go:26:2: error: import file 'github.com/streamsets/datacollector-edge/stages/origins' not found
main.go:27:2: error: import file 'github.com/streamsets/datacollector-edge/stages/processors' not found
main.go:28:2: error: import file 'github.com/streamsets/datacollector-edge/stages/services' not found
main.go:29:10: error: import file 'net/http' not found
main.go:30:4: error: import file 'os' not found
main.go:31:11: error: import file 'os/signal' not found
main.go:32:15: error: import file 'path/filepath' not found
main.go:33:9: error: import file 'runtime' not found
main.go:34:9: error: import file 'strings' not found
main.go:35:9: error: import file 'syscall' not found
main.go:101:25: error: expected package
main.go:104:34: error: expected package
main.go:115:37: error: expected package
main.go:116:35: error: expected ';' or '}' or newline
main.go:123:2: error: expected declaration
main.go:130:2: error: expected declaration
main.go:131:2: error: expected declaration
main.go:132:1: error: expected declaration
main.go:134:33: error: expected package
main.go:141:30: error: expected ';' or '}' or newline
main.go:147:2: error: expected declaration
main.go:148:2: error: expected declaration
main.go:149:2: error: expected declaration
main.go:151:2: error: expected declaration
main.go:153:2: error: expected declaration
main.go:156:4: error: expected declaration
main.go:158:4: error: expected declaration
main.go:162:5: error: expected declaration
main.go:164:5: error: expected declaration
main.go:166:5: error: expected declaration
main.go:167:4: error: expected declaration
main.go:168:3: error: expected declaration
main.go:170:4: error: expected declaration
main.go:172:4: error: expected declaration
main.go:174:4: error: expected declaration
main.go:175:3: error: expected declaration
main.go:176:2: error: expected declaration
main.go:182:6: error: expected declaration
main.go:184:3: error: expected declaration
main.go:186:4: error: expected declaration
main.go:187:4: error: expected declaration
main.go:188:4: error: expected declaration
main.go:190:4: error: expected declaration
main.go:191:4: error: expected declaration
main.go:192:4: error: expected declaration
main.go:193:4: error: expected declaration
main.go:194:4: error: expected declaration
main.go:196:5: error: expected declaration
main.go:198:5: error: expected declaration
main.go:199:4: error: expected declaration
main.go:201:4: error: expected declaration
main.go:201:48: error: expected declaration
main.go:203:4: error: expected declaration
main.go:204:4: error: expected declaration
main.go:205:3: error: expected declaration
main.go:206:2: error: expected declaration
main.go:208:3: error: expected declaration
main.go:209:3: error: expected declaration
main.go:210:3: error: expected declaration
main.go:212:3: error: expected declaration
main.go:213:3: error: expected declaration
main.go:214:3: error: expected declaration
main.go:214:47: error: expected declaration
main.go:216:3: error: expected declaration
main.go:217:3: error: expected declaration
main.go:218:2: error: expected declaration
main.go:220:3: error: expected declaration
main.go:222:3: error: expected declaration
main.go:223:2: error: expected declaration
main.go:224:1: error: expected declaration
main.go:226:42: error: expected package
main.go:227:19: error: expected package
main.go:42:17: error: reference to undefined name 'flag'
main.go:43:24: error: reference to undefined name 'flag'
main.go:44:17: error: reference to undefined name 'flag'
main.go:45:28: error: reference to undefined name 'flag'
main.go:46:29: error: reference to undefined name 'flag'
main.go:51:18: error: reference to undefined name 'flag'
main.go:56:27: error: reference to undefined name 'flag'
main.go:62:28: error: reference to undefined name 'flag'
main.go:68:24: error: reference to undefined name 'flag'
main.go:76:30: error: reference to undefined name 'flag'
main.go:82:25: error: reference to undefined name 'flag'
main.go:88:29: error: reference to undefined name 'flag'
main.go:94:27: error: reference to undefined name 'flag'
main.go:111:2: error: reference to undefined name 'fmt'
main.go:112:2: error: reference to undefined name 'fmt'
main.go:112:43: error: reference to undefined name 'runtime'
main.go:112:57: error: reference to undefined name 'runtime'
main.go:114:5: error: expected pointer
main.go:115:9: error: reference to undefined name 'http'
main.go:116:25: error: reference to undefined name 'tls'
main.go:119:3: error: reference to undefined name 'log'
main.go:139:2: error: reference to undefined name 'flag'
main.go:141:16: error: reference to undefined name 'service'
main.go:228:2: error: reference to undefined name 'signal'
main.go:228:19: error: reference to undefined name 'syscall'
main.go:228:35: error: reference to undefined name 'syscall'
main.go:229:2: error: reference to undefined name 'log'
main.go:234:30: error: reference to undefined name 'common'
main.go:234:72: error: reference to undefined name 'common'
main.go:235:5: error: reference to undefined name 'log'
main.go:237:6: error: reference to undefined name 'log'
main.go:231:3: error: range clause must have array, slice, string, map, or channel type
main.go:246:2: error: reference to undefined name 'log'
main.go:250:13: error: reference to undefined name 'os'
main.go:254:13: error: reference to undefined name 'strings'
main.go:254:32: error: reference to undefined name 'filepath'
main.go:255:12: error: reference to undefined name 'strings'
main.go:231:7: error: invalid type for range clause

ubuntu@ubuntu:/media/ubuntu/b23fdd4f-ed60-4566-85e3-d738616745c5/datacollector-edge/api/fieldtype$ llvm-goc field_type.go
llvm-goc: /tmp/workspace/llvm-project/llvm/tools/gollvm/driver/GnuTools.cpp:366: virtual bool gnutools::Linker::constructCommand(gollvm::driver::Compilation &, const gollvm::driver::Action &, const gollvm::driver::ArtifactList &, const gollvm::driver::Artifact &): Assertion `llvm::sys::path::is_absolute(executable)' failed.
l

lvm-goc[0x1f47657]
llvm-goc[0x1f477f9]
llvm-goc[0x1f4608b]
llvm-goc[0x1f47e9b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f7dbb3703c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f7dbaeec18b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f7dbaecb859]
/lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f7dbaecb729]
/lib/x86_64-linux-gnu/libc.so.6(+0x36f36)[0x7f7dbaedcf36]
llvm-goc[0x486f08]
llvm-goc[0x461b8c]
llvm-goc[0x461d1c]
llvm-goc[0x4556ee]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f7dbaecd0b3]
llvm-goc[0x454a9e]
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: llvm-goc field_type.go
Aborted (core dumped)

What did you expect to see?

Either a compiled executable or an assemly source file.

What did you see instead?

Gollvm crashed.

So this is the file, which I tried to compile:
https://github.com/streamsets/datacollector-edge/blob/master/api/fieldtype/field_type.go

Referenced source code, for gollvm project, is related to this line/file:
https://go.googlesource.com/gollvm/+/refs/heads/master/driver/GnuTools.cpp#366

If there is anything that I could run/debug/trace - please let me know.
Ivan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.