cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
614
Views
10
Helpful
1
Replies

Juniper NED: Erlang - error writing file

DTtb
Level 1
Level 1

 

Hi all,

 

during the compile of Juniper NED, I encounter an issue from Erlang compiler.

It looks like, that Erlang cannot find a file.

The directory is owned by user root inside a Docker container.

 

Maybe someone has a hint to fix it.

 

OS: CentOS 7 (7.9.2009)

Java: 1.8.0_275

Ant: 1.9.4

NED: juniper-junos-nc-4.6 (Version 4.6.14)

NSO-Version: 5.2.3

 

Log of compile run:

# cd /var/opt/ncs/packages/juniper-junos-nc-4.6/src
# make clean all rm -rf tmp-yang rm -f ../package-meta-data.xml rm -f ../load-dir/junos.fxs ../load-dir/junos-rpc.fxs rm -f ../load-dir/*.fxs rm -rf ./ncsc-out for lib in ../erlang-lib/ec_junos_ext_vlan; do \ make VLAN_CALLPOINT=_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp -C $lib clean || exit 1; \ done make[1]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' make[2]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' rm -f ../ebin/ec_junos_ext_vlan_sup.beam ../ebin/ec_junos_ext_vlan_server.beam ../ebin/ec_junos_ext_vlan.beam ../ebin/ec_junos_ext_vlan.app erl_crash.dump core* *~ make[2]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' make[1]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' cd ../netsim && make clean make[1]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/netsim' rm -f *.fxs make -C esrc clean make[2]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/netsim/esrc' rm -f ../ec_junos_ext_vlan_netsim_hook.beam make[2]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/netsim/esrc' make[1]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/netsim' rm -rf ../package-meta-data.xml if [ -x /opt/ncs/ncs-5.2.3/support/ned-make-package-meta-data ]; then \ sed -e 's,juniper-junos,juniper-junos,g' package-meta-data.xml.in > package-meta-data.xml.in.tmp ; \ /opt/ncs/ncs-5.2.3/support/ned-make-package-meta-data package-meta-data.xml.in.tmp ; \ rm package-meta-data.xml.in.tmp ; \ else \ cp package-meta-data.xml.in ../package-meta-data.xml; \ fi --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 chmod -w ../package-meta-data.xml if [ -x /opt/ncs/ncs-5.2.3/support/ned-make-package-meta-data ]; then \ echo -n " is built by: "; \ echo "support/ned-make-package-meta-data"; \ fi is built by: support/ned-make-package-meta-data mkdir -p tmp-yang tools/ypp --out-dir=tmp-yang --var=JUNOS_MIN_VER=14 --var=JUNOS_MAX_VER=99 \ --var=IGNORE_DIFF_IN_UNREADABLE="" \ --var=FORCE_NTP_SINGLE_SRC_ADDR="" \ --var=FORCE_NTP_MULTI_SRC_ADDR="" yang/junos.yang rm -f ncsc-out/modules/fxs/junos.fxs mkdir -p ./ncsc-out /opt/ncs/ncs-5.2.3/bin/ncsc --use-description --ncs-compile-module tmp-yang/junos.yang \ --ncs-device-dir ./ncsc-out \ --ncs-skip-statistics \ --ncs-keep-callpoints \ --ncs-device-type netconf \ --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 | 2>&1 \ grep -v 'has no actionpoint' || true rm -f ../load-dir/junos.fxs ln -s ../src/ncsc-out/modules/fxs/junos.fxs ../load-dir/junos.fxs mkdir -p tmp-yang tools/ypp --out-dir=tmp-yang --var=JUNOS_MIN_VER=14 --var=JUNOS_MAX_VER=99 \ --var=IGNORE_DIFF_IN_UNREADABLE="" \ --var=FORCE_NTP_SINGLE_SRC_ADDR="" \ --var=FORCE_NTP_MULTI_SRC_ADDR="" yang/junos-rpc.yang rm -f ncsc-out/modules/fxs/junos-rpc.fxs mkdir -p ./ncsc-out /opt/ncs/ncs-5.2.3/bin/ncsc --use-description --ncs-compile-module tmp-yang/junos-rpc.yang \ --ncs-device-dir ./ncsc-out \ --ncs-skip-statistics \ --ncs-keep-callpoints \ --ncs-device-type netconf \ --ncs-ned-id juniper-junos-nc-4.6:juniper-junos-nc-4.6 | 2>&1 \ grep -v 'has no actionpoint' || true rm -f ../load-dir/junos-rpc.fxs ln -s ../src/ncsc-out/modules/fxs/junos-rpc.fxs ../load-dir/junos-rpc.fxs for lib in ../erlang-lib/ec_junos_ext_vlan; do \ make VLAN_CALLPOINT=_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp -C $lib all || exit 1; \ done make[1]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' make[2]: Entering directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' erlc -DVLAN_CALLPOINT="'_juniper-junos-nc-4.6:juniper-junos-nc-4.6#ec_ext_vlan_list_hook_cp'" +warnings_as_errors +debug_info -pa /opt/ncs/ncs-5.2.3/erlang/econfd/ebin -pa ../../ec_junos_ext_vlan/ebin -o ../ebin ec_junos_ext_vlan_sup.erl /var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src/../ebin/ec_junos_ext_vlan_sup.bea#: error writing file: no such file or directory make[2]: *** [../ebin/ec_junos_ext_vlan_sup.beam] Error 1 make[2]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/src' make[1]: *** [all] Error 1 make[1]: Leaving directory `/var/opt/ncs/packages/juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan' make: *** [source] Error 1 rm tmp-yang/junos-rpc.yang tmp-yang/junos.yang

 

1 Accepted Solution

Accepted Solutions

DTtb
Level 1
Level 1

I found my mistake.

I used Git to track the changes for the dir.

But after a "make clean" the

juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/ebin

directory is empty. Git not commt empty directories.

Therefore the directory was missing and the Makefile didn't create this dir and the error was thrown. After re-creating of ebin dir the compilation works.

A empty .gitkeep file should keep the directory in Git context.

View solution in original post

1 Reply 1

DTtb
Level 1
Level 1

I found my mistake.

I used Git to track the changes for the dir.

But after a "make clean" the

juniper-junos-nc-4.6/erlang-lib/ec_junos_ext_vlan/ebin

directory is empty. Git not commt empty directories.

Therefore the directory was missing and the Makefile didn't create this dir and the error was thrown. After re-creating of ebin dir the compilation works.

A empty .gitkeep file should keep the directory in Git context.