UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
3,525 Views
Registered: ‎11-16-2017

Ubuntu 18 - error when running settings.sh

I'm getting this error when running settings.sh. Is this a compatibility problem in PetaLinux Tools, or?

 

user@Ubuntu-VM:~/Petalinux-Zybo-Z7-20$ source ~/PetaLinux/settings.sh
PetaLinux environment set to '/home/user/PetaLinux'
WARNING: /bin/sh is not bash! 
bash is PetaLinux recommended shell. Please set your default shell to bash.
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
0 Kudos
15 Replies
Scholar watari
Scholar
3,511 Views
Registered: ‎06-16-2013

Re: Ubuntu 18 - error when running settings.sh

Hi @fandrei

 

Would you try following command ?

 

% sudo apt-get install bash

[Install bash, if don't install bash]

% chsh

[Change your default shell from /bin/sh to /bin/bash]

% source ~/PetaLinux/settings.sh

 

Best regards,

 

0 Kudos
Contributor
Contributor
3,474 Views
Registered: ‎11-16-2017

Re: Ubuntu 18 - error when running settings.sh

@watari

 

user@Ubuntu-VM:~$ chsh
Password: 
Changing the login shell for user
Enter the new value, or press ENTER for the default
	Login Shell [/bin/bash]: /bin/bash
user@Ubuntu-VM:~$ source ~/PetaLinux/settings.sh
PetaLinux environment set to '/home/user/PetaLinux'
WARNING: /bin/sh is not bash! 
bash is PetaLinux recommended shell. Please set your default shell to bash.
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
0 Kudos
Scholar watari
Scholar
3,469 Views
Registered: ‎06-16-2013

Re: Ubuntu 18 - error when running settings.sh

Hi @fandrei

 

OK.

Would you change /bin/sh to bash by ex. symbolic link ?

 

% sudo mv /bin/sh /bin/sh.org

% sudo ln /bin/bash /bin/sh

 

Best regards,

 

0 Kudos
Contributor
Contributor
3,440 Views
Registered: ‎11-16-2017

Re: Ubuntu 18 - error when running settings.sh

@watari

 

user@Ubuntu-VM:~/PetaLinux$ sudo mv /bin/sh /bin/sh.org
user@Ubuntu-VM:~/PetaLinux$ sudo ln /bin/bash /bin/sh
user@Ubuntu-VM:~/PetaLinux$ source ~/PetaLinux/settings.sh
PetaLinux environment set to '/home/user/PetaLinux'
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services

Actually, I'm getting similar errors when installing the tools:

 

Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Webtalk Terms and Conditions? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
INFO: Checking installation environment requirements...
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide" for its impact and solution
INFO: Installing PetaLinux...
0 Kudos
Scholar watari
Scholar
3,438 Views
Registered: ‎06-16-2013

Re: Ubuntu 18 - error when running settings.sh

Hi @fandrei

 

Sorry. I'm stupid.

You can not use "~" insted of description of home when you install PetaLinux.

So, you should re-install PetaLinux.

Because of installed files have some wrong.

 

Would you try it ?

 

Best regards,

 

0 Kudos
Contributor
Contributor
3,425 Views
Registered: ‎11-16-2017

Re: Ubuntu 18 - error when running settings.sh

@watari

 

I'm getting the same errors when installing to /PetaLinux/

0 Kudos
Contributor
Contributor
3,365 Views
Registered: ‎11-16-2017

Re: Ubuntu 18 - error when running settings.sh

I re-checked it, and I'm only getting this error in Ubuntu 18. And Ubuntu 16 - no errors.

Must be a compatibility bug in PetaLinux Tools.

0 Kudos
3,178 Views
Registered: ‎02-22-2018

Re: Ubuntu 18 - error when running settings.sh

Hi,

 

I have the same problem and have no clue where to start to debug it. Does any body knows if it has a side effect on the loads created by Petalinux tools?

 

Regards,

0 Kudos
Newbie ecriscuolo
Newbie
3,111 Views
Registered: ‎07-09-2018

Re: Ubuntu 18 - error when running settings.sh

I get the exact same problem.  Ubuntu 18.04LTS.

I've isolated it to the executable petalinux-env-check.

 

$ "${PETALINUX}"/tools/common/petalinux/utils/petalinux-env-check
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 281: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 285: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
0 Kudos
Visitor wel
Visitor
2,530 Views
Registered: ‎07-05-2018

Re: Ubuntu 18 - error when running settings.sh

PetaLinux tools require your host system "/bin/sh" is bash. If you are using Ubuntu distribution and your "/bin/sh" is dash, you can consult your system administrator to change your default with sudo dpkg-reconfigure dash command.

You can find the answer  at https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1144-petalinux-tools-reference-guide.pdf  Page 11.

0 Kudos
Explorer
Explorer
2,439 Views
Registered: ‎03-22-2016

Re: Ubuntu 18 - error when running settings.sh

The issue remains even with bash:

 

user@host:~$ /bin/sh --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
user@host:~$ source /opt/petalinux/petalinux-2017.4/settings.sh
PetaLinux environment set to '/mnt/data/petalinux/petalinux-2017.4'
INFO: Checking free disk space
INFO: Checking installed tools
environment: line 314: ((: 10#15~1 > 10#3: syntax error in expression (error token is "~1 > 10#3")
environment: line 318: ((: 10#15~1 < 10#3: syntax error in expression (error token is "~1 < 10#3")
INFO: Checking installed development libraries
INFO: Checking network and other services
0 Kudos
Visitor mdm92
Visitor
2,182 Views
Registered: ‎07-27-2018

Re: Ubuntu 18 - error when running settings.sh

Hi,

I'm also facing the same error and don't know (haven't found any) the solution. how much will this error eventually effect?

0 Kudos
Adventurer
Adventurer
2,158 Views
Registered: ‎09-02-2018

Re: Ubuntu 18 - error when running settings.sh

Although is not officially supported, I'm using PetaLinux on Ubuntu 18.04.1. The syntax error generated by the setting.sh does not seems to have any effect.

 

But you may have others error. Check out this thread:

https://forums.xilinx.com/t5/Embedded-Linux/PetaLinux-build-fails-with-locale-errors-How-to-disable-locale/m-p/894431#M28960

 

Cheers,

Attila

0 Kudos
Moderator
Moderator
2,142 Views
Registered: ‎04-24-2017

Re: Ubuntu 18 - error when running settings.sh

Hi All,

 

Yocto 2.4.1 Rocko release(PetaLinux 2018.x) doesn't support Ubuntu-18.04.

 

Refer this AR https://www.xilinx.com/support/answers/71448.html. 

 

https://www.yoctoproject.org/docs/2.4.1/mega-manual/mega-manual.html#detailed-supported-distros

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor luffeyluo
Visitor
283 Views
Registered: ‎09-04-2019

Re: Ubuntu 18 - error when running settings.sh

sudo dpkg-reconfigure dash
and then select no
you will solve this problem
0 Kudos