Is there a syntax error in the shell script cl-dev.sh?


Hi,

When I try to make a development environment for cumulus linux in accordance with "Building a Development Environment for Cumulus Linux" doc, there is an error:

cumulus@cumulus$ sudo ./cl-dev.sh CumulusLinux-2.5./cl-dev.sh: line 10: [[: 1$: syntax error: invalid arithmetic operator (error token is "$")

Why does it disply?

Last but most important, How can i make the development environment for Cumulus Linux?

Thanks in advance!

LiHongguang

6 replies

Doc for those following along:

https://support.cumulusnetworks.com/hc/en-us/articles/202937323-Building-a-Development-Environment-f...

What's the target cpu architecture? For x86, just use VX!

If developing for PowerPC or ARM, it probably makes more sense to cross-compile rather than run Debian on a software emulated cpu.

Given the availability of VX, that KB may need to be retired. Thoughts?

trapier wrote:

Doc for those following along:


Li -

Run this:

apt-get install build-essential gawk automake autoconf libtool texinfo stgit binutils libreadline6-dev libjson0-dev libjson0-dbg debhelper dh-autoreconf dejagnu

To get a pretty good build env for Cumulus inside of the Cumulus VX.

If something doesn't build without a package, a apt-get install xxxx should be sufficient. Just make sure you are pointed at a wheezy repository.

donald
Donald Sharp wrote:

Li -

Run this:

apt-get install build-essential gawk automake autoconf libtool texinfo stgit bi...

Hi Donald,

Thanks for your reply!

After I ran the command based on your tip above, and then I typed "sudo ./cl-dev.sh CumulusLinux-2.5", some prompts disply as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
grub-pc-bin is already the newest version.
grub2-common is already the newest version.

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
jdoo : Conflicts: monit but 1:5.4-2+cl2.5 is to be installed
libdb5.1-dev : Depends: libdb5.1 (= 5.1.29-5) but 9999-cl2.5+1 is to be installed
linux-libc-dev : Conflicts: linux-kernel-headers
openvswitch-brcompat : Depends: openvswitch-switch (= 1.4.2+git20120612-9+cl2.5+4) but it is not going to be installed
openvswitch-ipsec : Depends: openvswitch-switch (= 1.4.2+git20120612-9+cl2.5+4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How can the issue be resolved?

Thank you for your time and I look forward to your reply.

LiHongguang

PS.

My box is Cumulus-VM-2.5.6, the source.list file with the following content:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The Cumulus Package Repository.#
# Only packages from this repository are supported
#
#

deb http://repo.cumulusnetworks.com CumulusLinux-2.5 main addons updates
deb http://repo.cumulusnetworks.com CumulusLinux-2.5 security-updates

# Uncomment the next line to get access to the testing component
# deb http://repo.cumulusnetworks.com CumulusLinux-2.5 testing

# Uncomment the next line to get access to the Cumulus community repository
# deb http://repo.cumulusnetworks.com/community/ CumulusLinux-Community-2.5 main addons updates

# Uncomment the next line to get access to the debian wheezy repository
deb http://ftp.us.debian.org/debian/ wheezy main non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main non-free
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Donald Sharp wrote:

Li -

Run this:

apt-get install build-essential gawk automake autoconf libtool texinfo stgit bi...

The packages suggested by Donald cover basic development requirements in Cumulus VX and Cumulus Linux.

The approach suggested by Donald should be used *instead* of cl-dev.sh.

Donald Sharp wrote:

Li -

Run this:

apt-get install build-essential gawk automake autoconf libtool texinfo stgit bi...

Thanks for your reply!

I will try it again on my debian box tommorow.

Reply