Error in backend: invalid llvm.linker.options building SourceKit-LSP on Ubuntu 18.10 - swift

I am following this tutorial in order to get Visual Studio Code and SourceKit-LSP integrated on Ubuntu 18.10, however, I got stuck at building sourcekit-lsp project.
The error I'm getting:
fatal error
:
error in backend: invalid llvm.linker.options
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 7.0.0-3 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
I'm not sure if its relevant, but after typing Swift in the console I get the following errors:
error: ld-2.28.so 0xffffffff0005f117: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f117: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x14167-0x141ca) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
error: ld-2.28.so 0xffffffff0005f184: adding range [0x141e0-0x141e6) which has a base that is less than the function's low PC 0x148c0. Please file a bug and attach the file at the start of this error message
Welcome to Swift version 5.0-dev (LLVM b10ce3d642, Clang c1979d7668, Swift 94b167db75).
Type :help for assistance.
I would appreciate if anyone could give me a hint how to solve the problem. The only thing that came up to my mind was reinstalling clang, but it hasn't solved the issue.

This is an llvm bug (https://bugs.llvm.org/show_bug.cgi?id=39743). See workaround here: https://forums.swift.org/t/error-while-trying-to-build-sourcekit-lsp-on-linux/18138/2

Related

Swift error on Windows: invalidManifestFormat: Missing or empty JSON output from manifest compilation

I've installed Swift 5.6.1 on my Windows 10 machine, including all the necessary Visual Studio components, but I can't seem to build anything. Even just running the following set of commands in git bash results in an error:
mkdir swiftTest
cd swiftTest
swift package init --type executable
swift build
Specifically, the swift build command gives the following errors:
warning: Failed creating default cache location, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
'swiftTest': error: invalidManifestFormat("Missing or empty JSON output from manifest compilation for swiftTest", diagnosticFile: nil)
The error message seems surprisingly rare -- the top google results were the source of the program that generated that error, and an unrelated error with similar wording from a ReactJS application.
Do I just have to add some flags to the swift build command, or is there something else wrong with my setup?
In my case what fixed it was invoking the command from a Visual Studio Developer Command prompt.

Error while installing AllegroGraph on Arch Linux

I get the following error when running install-agraph for agraph-6.6.0
An unhandled error occurred during initialization:
Loading sys:aclissl.so failed with error:
/home/<username>/agraph-6.6.0/aclissl.so: undefined symbol: CRYPTO_set_locking_callback.
[physical pathname is /home/<username>/agraph-6.6.0/aclissl.so]
Cannot find much with google-fu on this error - at least nothing useful. Any leads would be helpful.
This problem has been fixed in the upcoming 7.0 release of AllegroGraph. Your workaround, using a system with OpenSSL 1.0.x is the correct one, for the currently released version of AllegroGraph.

Encountered an error while compiling cobalt on raspberry pi

While compiling cobalt for raspberry pi on ninja, im getting an error like this:
undefined reference to symbol 'eglCreateImageKHR'
here is the full trace:
[1/1] LINK cobalt
FAILED: cobalt
/home/mi07/work/raspitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ #cobalt.rsp
/home/mi07/work/raspitools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: obj/starboard/raspi/2/../shared/open_max/starboard_platform.decode_target_create.o: undefined reference to symbol 'eglCreateImageKHR'
/home/mi07/work/raspitools/sysroot/opt/vc/lib/libbrcmEGL.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I googled it and found somewhat related article on this site.
As per this article the fault could be that of libssl1.0-dev not being there. I checked and found it was libssl-dev. Replaced it with libssl1.0-dev but still the error persists.
Can somebody tell me what is going wrong?
eglCreateImageKHR() is an EGL extension EGL_KHR_image. Since Cobalt compiled, it appears the headers declare the extension, but the linked EGL library didn't define it. It's surprising that only eglCreateImageKHR() is missing and not eglDestroyImageKHR as well.
At any rate, I recommend trying to update the EGL library, but I'm not familiar with the raspi install, so can't tell you the specifics.
Alternatively, it is safe to comment out the call to that function in decode_target_create.cc since SbImageIsDecodeSupported() always returns false for raspi (see image_is_decode_supported.cc), so decode targets should never be created / destroyed on the platform. (Decode target support is a work in progress for raspi.)
I resolved this by changing the os itself. The problem was that the cobalt was not compatible with raspi stretch but with raspi jessie. Because sysroot files are being copied from the OS it was creating that error. I don't know exactly where the difference is but changing to raspi jessie worked fine for me.

MATLAB Error: Can't check VCRTs

When I start MATLAB I suddenly receive the following error message on the command line:
ERROR: Can't check 8.0 VCRTs (starter line:956) System Error:
0x00000005 ERROR: Can't check 9.0 VCRTs (starter line:995) System
Error: 0x00000005 Installing required 8.0 run-time libraries. This may
take a few minutes...
I tried to repair and reinstall the Visual C++ Redistributables (2005 and 2008), but that didn't solve the problem. Doing online research I mainly found out that people who had a similar problem reinstalled windows. Well, does anyone have another idea what I could try in order to solve that?

Xcode Exit with Error 254 in iOS sdk

First of all, I know that there are many questions on this topic but couldn't find solution for me.
Suddenly,I am getting the clang error like as follow:
1. /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h:154:2: current parser token 'if'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: i386-apple-darwin11.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).
Command /Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254
I am not able to solve this.
*Please help me to solve this error..*
Use debugger to check where crash is occurring. As you have not sHown any code,perhaps nobody would be able to help you on this clearly. in order to get full support you must have to post code where app is crashing and you are getting this error.
Here is same error discussed in Apple Official Support Communities, also refer to this
hope this helps