Is vscode broken ?

That's not an error message, it's informing you that this port depends on another one, and that dependency should be built automatically.

Yeah it's just an unspecified Error 1 after that.

cd /usr/ports/devel/electron22 && make install clean

Code:
===>   electron22-22.3.17 depends on shared library: libcups.so - found (/usr/local/lib/libcups.so)
===>   electron22-22.3.17 depends on shared library: libkrb.so.3 - not found
===>   electron22-22.3.17 depends on shared library: libkrb.so.3 - not found
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/electron22
*** Error code 1

Stop.
 
Last edited by a moderator:
If anyone else if still trying to get VsCode installed, this is what worked for me:

Bash:
# I ran the build in a jail
cd /usr/ports/editors/vscode
# Specify newer electron version
env ELECTRON_VER_MAJOR=25 make install-missing-packages
# Generate pkg
env USE_PACKAGE_DEPENDS_ONLY=yes make package ELECTRON_VER_MAJOR=25

# On host
pkg install /path_to_jail_root/usr/ports/editors/vscode/work/pkg/vscode-1.81.1_2.pkg
 
And it's gone again... this gets frustrating. I reinstall periodically for clean testing, and I never know if I have my ide. I can use gedit for light edits, but I've started using vscode from ubuntu with ssh, it works pretty well.
 
I can't find vscode in the repo.
try to compile it via ports, but failed:

Freebsd 13.2-RELEASE
cd /usr/ports/editors/vscode
sudo make install clean

Code:
er CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.0.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps:/usr/ports/lang/rust/work/bootstrap/lib' /usr/ports/lang/rust/work/_build/bootstrap/debug/rustc --crate-name rustc_driver --edition=2021 compiler/rustc_driver/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=129 --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no -Zunstable-options --check-cfg 'values(feature)' --check-cfg 'names()' --check-cfg 'values()' -C metadata=b52f282798363e41 -C extra-filename=-b52f282798363e41 --out-dir /usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -C linker=cc -L dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern rustc_driver_impl=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_driver_impl-e385610155f4b4e4.rlib --cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' '--check-cfg=values(emulate_second_only_system)' '--check-cfg=values(windows_raw_dylib)' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=off -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Z binary-dep-depinfo -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/psm-bbdb4f23c5d43a73/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/rustc_llvm-b286433a4e4cdd9d/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib`
error: linking with `cc` failed: exit status: 1
Code:
    Building [=======================> ] 322/324: rustc_driver
Did not run successfully: exit status: 1
LD_LIBRARY_PATH="/usr/ports/lang/rust/work/bootstrap/lib:/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps:/usr/ports/lang/rust/work/bootstrap/lib" "/usr/ports/lang/rust/work/bootstrap/bin/rustc" "--crate-name" "rustc_driver" "--edition=2021" "compiler/rustc_driver/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=129" "--crate-type" "dylib" "--emit=dep-info,link" "-C" "prefer-dynamic" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-Zunstable-options" "--check-cfg" "values(feature)" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=b52f282798363e41" "-C" "extra-filename=-b52f282798363e41" "--out-dir" "/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps" "--target" "x86_64-unknown-freebsd" "-C" "linker=cc" "-L" "dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps" "-L" "dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps" "--extern" "rustc_driver_impl=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_driver_impl-e385610155f4b4e4.rlib" "--cfg=bootstrap" "--cfg=windows_raw_dylib" "-Csymbol-mangling-version=v0" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(parallel_compiler)" "--check-cfg=values(no_btreemap_remove_entry)" "--check-cfg=values(crossbeam_loom)" "--check-cfg=values(span_locations)" "--check-cfg=values(rustix_use_libc)" "--check-cfg=values(emulate_second_only_system)" "--check-cfg=values(windows_raw_dylib)" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=off" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-Z" "binary-dep-depinfo" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/psm-bbdb4f23c5d43a73/out" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/rustc_llvm-b286433a4e4cdd9d/out" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "--sysroot" "/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-sysroot" "-Ztls-model=initial-exec" "-Z" "force-unstable-if-unmarked"
    Building -------------
error: could not compile `rustc_driver` (lib) due to previous error
Code:
Traceback (most recent call last):
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/x.py", line 50, in <module>
    bootstrap.main()
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 1111, in main
    bootstrap(args)
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 1086, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 184, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/ports/lang/rust/work/_build/bootstrap/debug/bootstrap dist --jobs=12
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/lang/rust
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/lang/rust
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/ripgrep
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/textproc/ripgrep
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/vscode
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/vscode

I have check this https://forums.freebsd.org/threads/freebsd-12-1-release-p3-rust-fails-to-build.75049/
But my system has 32G RAM and 16G SWAP.


sudo cat /var/log/messages |grep rust
sudo cat /var/log/messages |grep kill
sudo cat /var/log/messages |grep make

No output.
 
Wait, there's rust in vscode now? Or better - it needs it to build?

This has almost turned into a science project - as if npm and Javascript isn't complicated enough yet. It's the kitchen sink of build pipelines. Throw in a little ruby, python, lua, java and pixie dust and you get a doctor's degree for compiling it successfully :)
 
I can't find vscode in the repo.

<https://www.freshports.org/editors/vscode/#packages>

No package information for this port in our database
Sometimes this happens. Not all ports have packages.


<http://beefy16.nyi.freebsd.org/build.html?mastername=132amd64-default&build=9218fd8f40f2#skipped>:

1699186322867.png

 
I can't find vscode in the repo.
try to compile it via ports, but failed:

Freebsd 13.2-RELEASE
cd /usr/ports/editors/vscode
sudo make install clean

Code:
er CARGO_PKG_README='' CARGO_PKG_REPOSITORY='' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.0.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=0 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps:/usr/ports/lang/rust/work/bootstrap/lib' /usr/ports/lang/rust/work/_build/bootstrap/debug/rustc --crate-name rustc_driver --edition=2021 compiler/rustc_driver/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=129 --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C embed-bitcode=no -Zunstable-options --check-cfg 'values(feature)' --check-cfg 'names()' --check-cfg 'values()' -C metadata=b52f282798363e41 -C extra-filename=-b52f282798363e41 --out-dir /usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps --target x86_64-unknown-freebsd -C linker=cc -L dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps -L dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps --extern rustc_driver_impl=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_driver_impl-e385610155f4b4e4.rlib --cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' '--check-cfg=values(emulate_second_only_system)' '--check-cfg=values(windows_raw_dylib)' -Zmacro-backtrace -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Zunstable-options -Csplit-debuginfo=off -Zunstable-options '-Wrustc::internal' -Cprefer-dynamic -Z binary-dep-depinfo -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/psm-bbdb4f23c5d43a73/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/rustc_llvm-b286433a4e4cdd9d/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib`
error: linking with `cc` failed: exit status: 1
Code:
    Building [=======================> ] 322/324: rustc_driver
Did not run successfully: exit status: 1
LD_LIBRARY_PATH="/usr/ports/lang/rust/work/bootstrap/lib:/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps:/usr/ports/lang/rust/work/bootstrap/lib" "/usr/ports/lang/rust/work/bootstrap/bin/rustc" "--crate-name" "rustc_driver" "--edition=2021" "compiler/rustc_driver/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts,future-incompat" "--diagnostic-width=129" "--crate-type" "dylib" "--emit=dep-info,link" "-C" "prefer-dynamic" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-Zunstable-options" "--check-cfg" "values(feature)" "--check-cfg" "names()" "--check-cfg" "values()" "-C" "metadata=b52f282798363e41" "-C" "extra-filename=-b52f282798363e41" "--out-dir" "/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps" "--target" "x86_64-unknown-freebsd" "-C" "linker=cc" "-L" "dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps" "-L" "dependency=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/release/deps" "--extern" "rustc_driver_impl=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/deps/librustc_driver_impl-e385610155f4b4e4.rlib" "--cfg=bootstrap" "--cfg=windows_raw_dylib" "-Csymbol-mangling-version=v0" "-Zunstable-options" "--check-cfg=values(bootstrap)" "--check-cfg=values(parallel_compiler)" "--check-cfg=values(no_btreemap_remove_entry)" "--check-cfg=values(crossbeam_loom)" "--check-cfg=values(span_locations)" "--check-cfg=values(rustix_use_libc)" "--check-cfg=values(emulate_second_only_system)" "--check-cfg=values(windows_raw_dylib)" "-Zmacro-backtrace" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Zunstable-options" "-Csplit-debuginfo=off" "-Zunstable-options" "-Wrustc::internal" "-Cprefer-dynamic" "-Z" "binary-dep-depinfo" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/psm-bbdb4f23c5d43a73/out" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/rustc_llvm-b286433a4e4cdd9d/out" "-L" "native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "--sysroot" "/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-sysroot" "-Ztls-model=initial-exec" "-Z" "force-unstable-if-unmarked"
    Building -------------
error: could not compile `rustc_driver` (lib) due to previous error
Code:
Traceback (most recent call last):
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/x.py", line 50, in <module>
    bootstrap.main()
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 1111, in main
    bootstrap(args)
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 1086, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/usr/ports/lang/rust/work/rustc-1.73.0-src/src/bootstrap/bootstrap.py", line 184, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /usr/ports/lang/rust/work/_build/bootstrap/debug/bootstrap dist --jobs=12
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/lang/rust
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/lang/rust
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/ripgrep
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/textproc/ripgrep
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/vscode
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/vscode

I have check this https://forums.freebsd.org/threads/freebsd-12-1-release-p3-rust-fails-to-build.75049/
But my system has 32G RAM and 16G SWAP.


sudo cat /var/log/messages |grep rust
sudo cat /var/log/messages |grep kill
sudo cat /var/log/messages |grep make

No output.
Instead of sudo make install clean try make install-missing-packages to use pkg to install rust etc instead of building everything from scratch. After that, do make install clean
 
fyi it is not vscode . just oss version …

True, thanks.

I guess, the port was named vscode for easy discoverability, amongst other things.

The resulting application is named Code - OSS, and the port is suitably commented:

Code:
% pkg query %c vscode
Visual Studio Code - Open Source ("Code - OSS")
% which vscode
/usr/local/bin/vscode
% cat /usr/local/bin/vscode
#!/bin/sh
exec code-oss "$@"
% which code-oss
/usr/local/bin/code-oss
% file /usr/local/bin/code-oss
/usr/local/bin/code-oss: symbolic link to ../share/code-oss/bin/code-oss
% file /usr/local/share/code-oss/bin/code-oss
/usr/local/share/code-oss/bin/code-oss: a sh script, ASCII text executable
% ls -hln /usr/local/share/code-oss/bin/code-oss
-rwxr-xr-x  1 0 0  2.1K  9 Oct 20:33 /usr/local/share/code-oss/bin/code-oss
%
 
After follow the steps below, I successfully compiled it.

Switch source.
/etc/pkg/FreeBSD.conf
Code:
FreeBSD: {
#  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

do some thing like:
Instead of sudo make install clean try make install-missing-packages to use pkg to install rust etc instead of building everything from scratch. After that, do make install clean

sudo pkg update
sudo pkg upgrade



at last run:
sudo make install clean

The port looks correct, my mistake:D
 
Don't modify /etc/pkg/FreeBSD.conf, your changes might get undone with an update. Instead, create a /usr/local/etc/pkg/repos/FreeBSD.conf and put your changes (and only the changes) in there.

Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
This will ensure your changes are safe and won't get reverted with an update.
 
Yes it works. I did 3 builds today.
1 failed, the 2 others worked.. :-D..
It takes 1h20min
Code:
cd /usr/ports/editors/vscode ; make -DBATCH install clean
 
Is anyone using Lapce instead? It's still in infancy, but maybe the more people start using it, the more chance people contribute and move development along, maybe we could have a solid replacement for the long run.

I use helix as a safe bet, but lapce got more stable these past 3-4 releases (sometimes it crashed losing unsaved work before that on freebsd) and I think they moved to a new UI framework and it shows in performance (floent, from druid unless I'm thinking about something else). There are some cons, but maybe it just needs some love.
It has a plugin system using wasm/wasi, so any language that compiles to wasi can be used to write plugins.
Let us pray.
This is the 2nd recommendation I've seen for lapce. So I tried it out. It's not bad, about like gedit at this point. The freebsd repo has version 0.2.8, which is still gtk based. The 0.3.0 version uses floent, I can install this on ubuntu, but don't, it's still really buggy. But it's easy to hack on. I fixed an issue I had syntax highlighting objective-c, and I am not a rust programmer. Yet.
 
Newb question: why run Visual Studio on FBSD at all?
What is the attraction?

I have various VS packages on different Windows VMs, for the rare times when I actually need (or want) to use it.
It seems quite odd to me to attempt to run a Windows development environment into an alien (non-Windows) OS.

I don't have a dog in this event... just very curious WHY the mix of VS with FBSD.
I don't write anything for FBSD, but if I had to, I'd probably look at Lazarus first.
 
Newb question: why run Visual Studio on FBSD at all?
What is the attraction?

I have various VS packages on different Windows VMs, for the rare times when I actually need (or want) to use it.
It seems quite odd to me to attempt to run a Windows development environment into an alien (non-Windows) OS.

I don't have a dog in this event... just very curious WHY the mix of VS with FBSD.
I don't write anything for FBSD, but if I had to, I'd probably look at Lazarus first.
VSCode is not the same as Visual Studio, it's a popular cross-platform code editor that also runs on Windows/Linux/Mac.
 
Newb question: why run Visual Studio on FBSD at all?
What is the attraction?

I have various VS packages on different Windows VMs, for the rare times when I actually need (or want) to use it.
It seems quite odd to me to attempt to run a Windows development environment into an alien (non-Windows) OS.

I don't have a dog in this event... just very curious WHY the mix of VS with FBSD.
I don't write anything for FBSD, but if I had to, I'd probably look at Lazarus first.
Programming scala in vscode on FBSD works super.
You hover with your mouse and the editor tells you the datatype of the thing you have written. Datatypes are inferred by the language-server plugin.
You write an error , and errors are shown as you type. So you know it won't compile.
[ Note 1 : Vscode plugins relying on dotnet might not work eg ionide for F# ]

[ Note 2 : I use java-17 & idea-inttelij editor crashes ]
 
Newb question: why run Visual Studio on FBSD at all?
What is the attraction?
It's a good IDE, pretty adaptable to work with, if you're doing .NET stuff on Windows 11 for work, and C++ and CMake on FreeBSD using clang/llvm for your spare time. It's nice to have the consistency.

Not all of us are dogmatic towards FreeBSD or open source, personally I"d like to see the Microsoft/proprietary extensions in the FreeBSD version, perhaps there is a way to enable them?
 
vscode is my primary editor , second by neovim.
But if someone can port "codium" towards freebsd. Why not?. Well not all extensions/plugins work with codium.
 
Back
Top