FreeBSD Jail Install Illegal variable name

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
jackalopes
Posts: 4
Joined: Wed Jul 22, 2020 7:41 pm

FreeBSD Jail Install Illegal variable name

Post 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.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: FreeBSD Jail Install Illegal variable name

Post by BradleyS »

The build output will be quite helpful in diagnosing this.

jackalopes
Posts: 4
Joined: Wed Jul 22, 2020 7:41 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

jackalopes
Posts: 4
Joined: Wed Jul 22, 2020 7:41 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: FreeBSD Jail Install Illegal variable name

Post by Woodstock »

jackalopes, what do you get when you execute this command?

Code: Select all

echo "$SHELL"

jackalopes
Posts: 4
Joined: Wed Jul 22, 2020 7:41 pm

Re: FreeBSD Jail Install Illegal variable name

Post by jackalopes »

Code: Select all

root@HandBrake:~ # echo "$SHELL"
/bin/csh

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: FreeBSD Jail Install Illegal variable name

Post by Woodstock »

That would explain things, because csh would require the variable to be "set", rather than just the assignment.

Code: Select all

set FOO="bar"
The FreeBSD pages say tcsh is the default shell for root, with sh being default for non-root users.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: FreeBSD Jail Install Illegal variable name

Post 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.

Post Reply