headmelted / codebuilds

Community builds of Visual Studio Code for Chromebooks and Raspberry Pi
https://code.headmelted.com
MIT License
1.03k stars 56 forks source link

Code-OSS failed to highlight on Raspbain #21

Closed C0618C closed 7 years ago

C0618C commented 7 years ago

Thank you for your work on building code on armhf.

Code-OSS can't highlight js/html/css(and any other,I think). and come out some errors show:The mode has failed while tokenizing the input.

There are some information that i think it will be useful below.

bug3

What can I do to fix it?

Thx.

NTBTI commented 7 years ago

I had the same problem running on a Samsung Chromebook (same armhf processor) using Ubuntu 14.04. I don't have a Pi to try this on so I have no idea if it will work for you or not, but the lower library version problem looks exactly the same.

First I went here https://packages.debian.org/stretch/libstdc++6 and grabbed the .deb file for armhf, unpacked it (ar vx packagilefile.deb) then untarred data.tar.xv (tar xfv data.tar.xv). Then copied the new file (in my case it was libstdc++.so.6.0.22) and re-created the symlink to have libstdc++.so.6 now point to libstdc++.so.6.0.22 For good measure I removed ~/.vs-code then purged the installer (no idea if any of this was necessary) and then re-installed. After that no more errors! Hope it helps.

tilda commented 7 years ago

Having same problem - will try @NTBTI solution when my Pi finishes updating.

tilda commented 7 years ago

Actually, turns out I used the solution when updating. Here's my part:

But after the upgrade is done - I restarted VS Code and no errors happened.

headmelted commented 7 years ago

@xshotD thanks for adding a solution.

Interesting though that this requires a change to stretch to resolve. I'm skeptical that there would be an unpatched bug in Jessie that would cause this, so I'm leaning towards it either being configuration or dependencies related.

I'm working through a couple of build items then I'll get back to looking at this!

tilda commented 7 years ago

Jessie just has a outdated libc6, as noted in the error message in the dev tools - libc6 in Debian/Raspbian Jessie is 2.19 and Stretch is 2.24 in the repos.

cuibonobo commented 7 years ago

I tried @NTBTI's solution and it worked just fine without having to reinstall. Just restarting the app worked for me.

C0618C commented 7 years ago

I had try the way that @NTBTI suggess too.But I don't know how to do with this:

Then copied the new file (in my case it was libstdc++.so.6.0.22) and re-created the symlink to have libstdc++.so.6 now point to libstdc++.so.6.0.22

  • Where to paste the new file
  • How to re-created the symlink
    Can anyone tell me what cmd would make the magic?

@xshotD,I'm sorry to tell you that it doesn't work on my pi.
I upgrade to the Stretch,then install the OSS,But, the same problem had come out.
And wireless interface couldn't find in Stretch.

--- update --- I used the cmd sudo apt-get install npm -y and no errors comout(still in Stretch with wireless problem)

headmelted commented 7 years ago

This is interesting.

Two things I would suggest - firstly, can you try the latest version from the script?. I've been working on a significant re-write of how this works and I'd like to make sure that you and I are both looking at the same build on the same architecture.

If the latest version doesn't work - try this for me in a terminal (the whole line verbatim):

find / -name "libstdc++.so.6"

.. and paste the result back here.

We'll get this sorted quickly - I did have to do some symlinking for this during development so I'm confident it will not be a difficult fix.

howprice commented 7 years ago

I'm having the same problem as in the original post on Raspberry Pi 3. Installed and updated last night. I am wary of updating to stretch or trying any hacky fixes.

sudo find / -name "libstdc++.so.6" returns nothing

Is the fix available yet?

tilda commented 7 years ago

is libc6 installed?

headmelted commented 7 years ago

ok - howprice - that it's not there is actually a good thing in this case.

Try this for me:

sudo apt-get install -y libstdc++6

Can you post the result back here?

Also - once you've run the above, can you then retry launching?

howprice commented 7 years ago
$ sudo apt-get install -y libstdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libstdc++6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

But strangely now:

$ sudo find / -name "libstdc++.so.6"
/usr/lib/arm-linux-gnueabihf/libstdc++.so.6

Full output FYI:

pi@raspberrypi:~/Downloads $ sudo find / -name "libstdc++.so.6"
pi@raspberrypi:~/Downloads $ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~/Downloads $ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~/Downloads $ code-oss --version
1.14.0
4c2b9a6917af708af7661d28ce33547f6f7038e3
pi@raspberrypi:~/Downloads $ sudo apt-get -s install code-oss
Reading package lists... Done
Building dependency tree       
Reading state information... Done
code-oss is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~/Downloads $ sudo apt-show-versions code-oss
sudo: apt-show-versions: command not found
pi@raspberrypi:~/Downloads $ dpkg --get-selections | grep "code-oss"
code-oss                    install
pi@raspberrypi:~/Downloads $ cd ..
pi@raspberrypi:~ $ code-oss
pi@raspberrypi:~ $ sudo apt-get install -y libstdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libstdc++6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ sudo find / -name "libstdc++.so.6"
/usr/lib/arm-linux-gnueabihf/libstdc++.so.6
pi@raspberrypi:~ $ 
C0618C commented 7 years ago

@headmelted sorry,I'm busy at work.Maybe I would try it later

markwrenn commented 7 years ago

It took two tries to get the find command to work:

image

headmelted commented 7 years ago

I've done some rework to the cross-compilation toolchain to make it use Debian Jessie (with emdebian) instead Of Ubuntu Xenial (with ports.ubuntu.com) to hopefully resolve this issue.

Can I get you to try a fresh install when you get the chance? (It should, for example, work with the libstdc++ that you have installed now, but I have no way of guaranteeing that just yet as it works for me anyway.

michael-tamse commented 7 years ago

I executed . <( wget -O - https://code.headmelted.com/installers/apt.sh ) again and it works fine on my RPi3. Thank you very much.

headmelted commented 7 years ago

@MiShibari

Success! Glad it worked for you. 😃

Incidentally, this change should take the minimum Ubuntu release required all the way back to 14.04 (trusty) too.

Can other folks in the thread confirm this fixes it for them too when they get a chance?

Thanks!

howprice commented 7 years ago

That's worked for me too. Many thanks.

markwrenn commented 7 years ago

Working like a charm!

Thanks for all the work you do on this!

headmelted commented 7 years ago

Glad to hear it seems to have done the trick.

I'll close out this thread for now. If anyone else on the thread experiences this issue, feel free to re-open.

Thanks again for the feedback!

bmwertman commented 6 years ago

I'm seeing this issue on my Wheezy Raspberry Pi 2. For some reason when I try to run

. <( wget -O - https://code.headmelted.com/installers/apt.sh ) I get an error.

GnuTLS : A TLS fatal alert has been received Unable to establish SSL connection

tilda commented 6 years ago

That's unrelated to the topic of this issue. Although, you may have a busted connection or something.

bmwertman commented 6 years ago

I realize the wget issue is not directly related. But the only reason I was trying to use wget was because I'm experiencing the same error message from Code-OSS with regarding highlighting.