For bash?
Just put the below in ~/.bash_profile?
export DOTNET_ROOT=$(pwd)/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Edit: tried that, doesn't work.
For bash?
export DOTNET_ROOT=$(pwd)/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Yes - what msplsh said.I have no idea how to make the above variables persist. I was expecting a .bashrc or something, but my environment doesn't have one. If anyone can assist or direct with that, would be appreciated.
Oh nevermind. taiwan740 is using bash.A login shell first reads commands from the files /etc/profile and then .profile in a user's home directory, if they exist. If the environment variable ENV is set on entry to a shell, or is set in the .profile of a login shell, the shell then subjects its value to parameter expansion and arithmetic expansion and reads commands from the named file.
mv ~/Downloads/dotnet-sdk-7.0.403-freebsd-x64.tar.gz ~/
DOTNET_FILE=dotnet-sdk-7.0.403-freebsd-x64.tar.gz
export DOTNET_ROOT=$(pwd)/.dotnet
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
setenv DOTNET_FILE dotnet-sdk-7.0.403-freebsd-x64.tar.gz
setenv DOTNET_ROOT $(pwd)/.dotnet
Illegal variable name
csh
does not support$(pwd)
, that's Bourne dialect. You should be able to do
Code:set P=`pwd` setenv DOTNET_ROOT $P/.dotnet
set PATH $PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
not working for me either - could you please assist? I'm bad at this, but I'm currently writing documentation and needs to be right. setenv PATH $PATH\:$DOTNET_ROOT\:$DOTNET_ROOT/tools
This might have to do withIt breaks upon reboot.
$DOTNET_ROOT
- unless you set that as well, the setenv statement won't evaluate right during boot.My /etc/csh.cshrc looks like thisThis might have to do with$DOTNET_ROOT
- unless you set that as well, the setenv statement won't evaluate right during boot.
set P=`pwd`
setenv DOTNET_ROOT $P/.dotnet
setenv PATH $PATH\:$DOTNET_ROOT\:$DOTNET_ROOT/tools
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $DOTNET_ROOT $DOTNET_ROOT/tools)
dice@molly:~ % ll ~/bin/
total 13
-rwxr-xr-x 1 dice dice 127 Aug 2 2020 cpu_temp.sh
lrwxr-xr-x 1 dice dice 20 Oct 28 22:30 go -> /usr/local/bin/go120
-rwxr-xr-x 1 dice dice 676 Jun 28 2013 mpjoin.pl
I've just realised the /etc/csh.cshrc implementation is working, but it doesn't work if you start xterm or whatever from a directory. It uses the starting directory as ~ and not the users home directory, thereforePATH is set differently on the C shells. Your default ~/.cshrc should already contain something:
So set it to something like:Code:set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
Code:set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $DOTNET_ROOT $DOTNET_ROOT/tools)
Or get a little creative with symlinks in ~/bin/ (because it's already part of PATH by default).
Code:dice@molly:~ % ll ~/bin/ total 13 -rwxr-xr-x 1 dice dice 127 Aug 2 2020 cpu_temp.sh lrwxr-xr-x 1 dice dice 20 Oct 28 22:30 go -> /usr/local/bin/go120 -rwxr-xr-x 1 dice dice 676 Jun 28 2013 mpjoin.pl
dotnet --version
doesn't work in that instance.~ is not the CWD (Current Working Directory) or a 'starting' directory, it's an alias for $HOME. ~ and $HOME are the same, but some shells don't understand the ~ notation.It uses the starting directory as ~
Am I right in thinking that is purely runtime (not the SDK)? Will the user be able to specify runtime version on config/build?The finished port for dotnet is available here: https://github.com/arrowd/freebsd-ports/tree/dotnet
It currently can only be built on FreeBSD 13, but it is easily fixable. However, it requires additional tweaks on the Poudriere side so I'm waiting for reply from portmgr@ before putting this into Ports tree.
This repo - https://github.com/arrowd/freebsd-ports/tree/dotnet - makes no sense to me. What are the 'shells', 'sysutils' and 'textproc' folders doing there?I don't have deep understanding of .NET internals, but this is a build product of https://github.com/dotnet/dotnet repo. So it is probably not only runtime, but the fullest package it can be.
That freebsd-ports repo fork gets merged into the freebsd-ports main repo at some point, I assume. It's not a 'dotnet' repoThis repo - https://github.com/arrowd/freebsd-ports/tree/dotnet - makes no sense to me. What are the 'shells', 'sysutils' and 'textproc' folders doing there?
The only commit you need from this repo is the topmost one.This repo - https://github.com/arrowd/freebsd-ports/tree/dotnet - makes no sense to me. What are the 'shells', 'sysutils' and 'textproc' folders doing there?
[00:04:35] ===> Building for dotnet-8.0.0
[00:04:35] cd /wrkdirs/usr/ports/lang/dotnet/work/dotnet-8.0.0 && /usr/bin/env OPENSSLBASE=/usr/local OPENSSLDIR=/usr/local/openssl OPENSSLINC=/usr/local/include OPENSSLLIB=/usr/local/lib OPENSSLRPATH=/usr/local/lib XDG_DATA_HOME=/wrkdirs/usr/ports/lang/dotnet/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/lang/dotnet/work XDG_CACHE_HOME=/wrkdirs/usr/ports/lang/dotnet/work/.cache HOME=/wrkdirs/usr/ports/lang/dotnet/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/lang/dotnet/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/lang/dotnet/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES DEFAULT_AUTOCONF=2.71 PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -march=alderlake -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -Wl,-rpath,/usr/local/lib:/usr/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -march=alderlake -fstack-protector-strong -fno-strict-aliasing " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" PYTHON=/usr/local/bin/python3.9 ./build.sh --release-manifest release.json --clean-while-building --with-sdk /wrkdirs/usr/ports/lang/dotnet/work/bootstrap_sdk --with-packages /wrkdirs/usr/ports/lang/dotnet/work/packages -- -maxcpucount:12
[00:04:35] Detected '--': passing remaining parameters '-maxcpucount:12' as build.sh arguments.
[00:04:35] Failed to create CoreCLR, HRESULT: 0x8007FF02
[00:04:35] Using custom bootstrap SDK from '/wrkdirs/usr/ports/lang/dotnet/work/bootstrap_sdk', version ''
[00:04:35] Found bootstrap SDK , bootstrap Arcade 8.0.0-beta.23516.4, bootstrap SourceLink 8.0.0-beta.23510.2
[00:04:35] Failed to create CoreCLR, HRESULT: 0x8007FF02
[00:04:35] *** Error code 137
[00:04:35]
[00:04:35] Stop.
[00:04:35] make: stopped in /usr/ports/lang/dotnet
[00:04:37] =>> Cleaning up wrkdir
[00:04:37] ===> Cleaning for dotnet-8.0.0
[00:04:37] build of lang/dotnet | dotnet-8.0.0 ended at Mon Jan 29 10:53:20 UTC 2024
[00:04:37] build time: 00:04:37
[00:04:37] !!! build failure encountered !!!
… Packages should follow in next couple of days.
root@mowa219-gjp4-zbook-freebsd:~ # pkg install --fetch-only --quiet --yes lang/dotnet
root@mowa219-gjp4-zbook-freebsd:~ # pkg install --no-repo-update lang/dotnet
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
compat13x-amd64: 13.2.1302001.20231227 [FreeBSD-ports]
dotnet: 8.0.0 [FreeBSD-ports]
Number of packages to be installed: 2
The process will require 472 MiB more space.
Proceed with this action? [y/N]: y
[1/2] Installing compat13x-amd64-13.2.1302001.20231227...
[1/2] Extracting compat13x-amd64-13.2.1302001.20231227: 100%
[2/2] Installing dotnet-8.0.0...
[2/2] Extracting dotnet-8.0.0: 100%
root@mowa219-gjp4-zbook-freebsd:~ # date ; uname -aKU
Tue Feb 6 07:49:24 GMT 2024
FreeBSD mowa219-gjp4-zbook-freebsd 15.0-CURRENT FreeBSD 15.0-CURRENT #2 main-n267824-0dd5a5603e7a-dirty: Sun Jan 28 17:40:54 GMT 2024 grahamperrin@mowa219-gjp4-zbook-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1500012 1500012
root@mowa219-gjp4-zbook-freebsd:~ # nano /usr/local/etc/pkg/repos/FreeBSD-base.conf
root@mowa219-gjp4-zbook-freebsd:~ # pkg -vv | grep -e url -e enabled -e priority
url : "http://pkg0.fra.freebsd.org/FreeBSD:15:amd64/latest",
enabled : yes,
priority : 2,
url : "pkg+https://pkg.freebsd.org/FreeBSD:15:amd64/base_latest",
enabled : yes,
priority : 0,
url : "file:///usr/local/poudriere/data/packages/main-default",
enabled : yes,
priority : 3
root@mowa219-gjp4-zbook-freebsd:~ #
The only correct answer: port Ryujinx to FreeBSD. I'll probably have a look at it now.Now. What to do with it?
I'm quite clueless, but something at the back of my mind (distant memory) says, Microsoft OneDrive or Teams.