Page 1 of 1
FreeBSD Jail Install Illegal variable name
Posted: Wed Jul 22, 2020 7:51 pm
by jackalopes
Description of problem or question:
Walking through the documentation for Building HandBrake for BSD, I get an "Illegal variable name" when I enter the command
Code: Select all
./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch
Steps to reproduce the problem (If Applicable):
I followed the following installation documentation
Installing dependencies on FreeBSD
Building HandBrake for BSD
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
FreeBSD 11.2 Stable; FreeNAS-11.3-U3.2
HandBrake Activity Log ***required*** (see
How-to get an activity log)
Code: Select all
Cannot get HandBrake installed and therefore cannot create an activity log.
Re: FreeBSD Jail Install Illegal variable name
Posted: Fri Jul 24, 2020 2:19 pm
by BradleyS
The build output will be quite helpful in diagnosing this.
Re: FreeBSD Jail Install Illegal variable name
Posted: Fri Jul 24, 2020 7:02 pm
by jackalopes
Here is where I've run into errors:
Code: Select all
Installing dependencies on FreeBSD
*************************************
root@HandBrake:~ # LASTDIR="`pwd`"
LASTDIR=/root: Command not found.
[HandBrake] Installing lame-3.100_2...
root@HandBrake:/usr/ports/audio/lame # cd "$LASTDIR"
LASTDIR: Undefined variable.
Building HandBrake for BSD
*************************************
root@HandBrake:~ # git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake
Cloning into 'HandBrake'...
remote: Enumerating objects: 117, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 93175 (delta 48), reused 55 (delta 26), pack-reused 93058
Receiving objects: 100% (93175/93175), 86.99 MiB | 9.37 MiB/s, done.
Resolving deltas: 100% (69961/69961), done.
root@HandBrake:~/HandBrake # ./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch
Illegal variable name.
Re: FreeBSD Jail Install Illegal variable name
Posted: Sun Jul 26, 2020 5:09 am
by BradleyS
What shell are you using? If FOO="bar" yields an error instead of setting the value of the variable FOO to bar, then there's a shell/system issue at play.
Re: FreeBSD Jail Install Illegal variable name
Posted: Sun Jul 26, 2020 11:46 pm
by jackalopes
BradleyS wrote: ↑Sun Jul 26, 2020 5:09 am
What shell are you using? If FOO="bar" yields an error instead of setting the value of the variable FOO to bar, then there's a shell/system issue at play.
I honestly have no idea what you're reffering to. I've ssh'd into my server via Putty.
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 2:06 am
by BradleyS
Putty is great. That said, the basic commands you are issuing are failing horribly for unknown reasons. I'm not sure what to suggest here, seems to be a shell and/or Putty settings issue.
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 1:36 pm
by Woodstock
jackalopes, what do you get when you execute this command?
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 5:10 pm
by jackalopes
Code: Select all
root@HandBrake:~ # echo "$SHELL"
/bin/csh
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 6:06 pm
by Woodstock
That would explain things, because csh would require the variable to be "set", rather than just the assignment.
The FreeBSD pages say tcsh is the default shell for root, with sh being default for non-root users.
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 6:24 pm
by BradleyS
Indeed, the documentation for FreeBSD is not written for C Shell (csh) but for Bourne Shell (sh). There's even a Bash-ism in the guide because I had some weird issue with the if statement IIRC (will try to fix with single brackets and patience eventually).
For now, a quick fix would be to install Bash Shell (pkg install bash) which is already listed as a requirement, then use Bash at least temporarily for the build. So your first command via Putty would be "bash" without the quotes, then the rest of the commands should work.
Re: FreeBSD Jail Install Illegal variable name
Posted: Thu Jul 30, 2020 6:25 pm
by BradleyS
Oh, and Putty might have a setting to choose the shell on connect, in which case you could choose sh or bash if available.