Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue - Lux don't work #45

Open
NicoCisco opened this issue Jul 1, 2022 · 6 comments
Open

Compilation issue - Lux don't work #45

NicoCisco opened this issue Jul 1, 2022 · 6 comments

Comments

@NicoCisco
Copy link

Hi

when i'm trying to in compile LUX on Centos 7 i got this error:

[admin@nso5-srv1 lux-master]$ make
make[1]: Entering directory /home/admin/Lux/lux-master/src' "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_parse.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_utils.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_interpret.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_junit.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_log.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_main.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_parse.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_product.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_shell.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_suite.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_tap.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_trace.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_utils.erl sed -e "s/%VSN%/2.8.1/g" < lux.app.src > ../ebin/lux.app make[1]: Leaving directory /home/admin/Lux/lux-master/src'
make[1]: Entering directory /home/admin/Lux/lux-master/c_src' gcc -o ../priv/bin/runpty -g -O2 -Wall runpty.c runpty.c: In function 'main': runpty.c:460:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[1]: Leaving directory /home/admin/Lux/lux-master/c_src'

also when i try to run Lux this is the error:

[admin@nso5-srv1 ~]$ /usr/local/bin/lux

FATAL ERROR: error:undef
[{lux_args,getopts,[[],"/usr/local/lib/lux","/usr/local/bin/lux"],[]},
{lux_main,unsafe_main,1,[{file,"lux_main.erl"},{line,22}]},
{lux_escript,main,1,[{file,"/usr/local/bin/lux"},{line,48}]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_it,1,[]},
{init,start_em,1,[]}]

=ERROR REPORT==== 1-Jul-2022::09:47:28 ===
Loading of /usr/local/lib/lux/ebin/lux_args.beam failed: badfile

=ERROR REPORT==== 1-Jul-2022::09:47:28 ===
beam/beam_load.c(1158): Error loading module lux_args:
mandatory chunk of type 'Atom' not found

[admin@nso5-srv1 ~]$

i suppose for the error showing in compiling process.

what i did?

i did the autoconfigure, then modify the include.mk in ERLAC=" " i put the path to local erlc because the firt time i try to compile the path was populated to nso erlac application ("/home/odl/nso/5.3.6/bin/erlc" to ERLC="/usr/bin/erlc"
after that the ERLAN value is ok:

Erlang

ERL="/usr/bin/erl"
ERLC="/usr/bin/erlc"
EMULATOR=beam

then i run MAKE command as show on top and i got the error.

how could i can fix this and run properly Lux ?

@JohanVikman
Copy link
Contributor

I don't think the error from building is much of a problem, there's an exit before the end of the function that cannot be avoided.

@JohanVikman
Copy link
Contributor

Could you try running the autoconf without first sourcing the NSO install env file? That way we could rule out that as a problem.

@NicoCisco
Copy link
Author

Hi,

yes i try it but without result.
check the entire process:

[admin@nso5-srv1 ~]$ source .bashrc
[admin@nso5-srv1 ~]$ cd Lux/
[admin@nso5-srv1 Lux]$ ll
total 352
drwxrwxr-x. 14 admin admin 4096 Jun 28 18:22 lux-master
-rw-r--r--. 1 admin admin 355962 Jun 28 17:54 lux-master.zip
[admin@nso5-srv1 Lux]$ cd lux-master
[admin@nso5-srv1 lux-master]$ autoconf
[admin@nso5-srv1 lux-master]$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for dup2... yes
checking for select... yes
checking for erl... /usr/bin/erl
checking for erlc... /opt/ncs/ncs-5.3.6/bin/erlc
checking for markdown... no
configure: creating ./config.status
config.status: creating include.mk
configure: creating ./config.status
config.status: creating include.mk
[admin@nso5-srv1 lux-master]$ make
make[1]: Entering directory /home/admin/Lux/lux-master/src' make[1]: Nothing to be done for all'.
make[1]: Leaving directory /home/admin/Lux/lux-master/src' make[1]: Entering directory /home/admin/Lux/lux-master/c_src'
make[1]: Nothing to be done for all'. make[1]: Leaving directory /home/admin/Lux/lux-master/c_src'
[admin@nso5-srv1 lux-master]$
[admin@nso5-srv1 lux-master]$ which lux
/usr/local/bin/lux
[admin@nso5-srv1 lux-master]$ /usr/local/bin/lux

FATAL ERROR: error:undef
[{lux_args,getopts,[[],"/usr/local/lib/lux","/usr/local/bin/lux"],[]},
{lux_main,unsafe_main,1,[{file,"lux_main.erl"},{line,22}]},
{lux_escript,main,1,[{file,"/usr/local/bin/lux"},{line,48}]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_it,1,[]},
{init,start_em,1,[]}]

=ERROR REPORT==== 4-Jul-2022::11:19:25 ===
Loading of /usr/local/lib/lux/ebin/lux_args.beam failed: badfile

=ERROR REPORT==== 4-Jul-2022::11:19:25 ===
beam/beam_load.c(1158): Error loading module lux_args:
mandatory chunk of type 'Atom' not found

[admin@nso5-srv1 lux-master]$ source /opt/ncs/current/ncsrc
ncsrc ncsrc.tcsh
[admin@nso5-srv1 lux-master]$ source /opt/ncs/current/ncsrc
[admin@nso5-srv1 lux-master]$

@NicoCisco
Copy link
Author

we have a system install not a local install

@NicoCisco
Copy link
Author

Also we try to remove the old folder e remove /usr/local/bin/lux and then restart again the entire procedure exiting from NSO env.

this is the logs:
[admin@nso5-srv1 profile.d]$ export PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/admin/.local/bin:/home/admin/bin
[admin@nso5-srv1 profile.d]$ env
MANPATH=/opt/ncs/ncs-5.3.6/man:/opt/ncs/ncs-5.3.6/man:/opt/ncs/ncs-5.3.6/man:/opt/ncs/ncs-5.3.6/man:/opt/ncs/current/man:/usr/share/man
XDG_SESSION_ID=2521
HOSTNAME=nso5-srv1
SELINUX_ROLE_REQUESTED=
TERM=xterm-256color
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=192.168.22.35 39706 22
SELINUX_USE_CURRENT_RANGE=
OLDPWD=/home/admin
SSH_TTY=/dev/pts/3
USER=admin
LD_LIBRARY_PATH=/opt/ncs/ncs-5.3.6/lib:/opt/ncs/ncs-5.3.6/lib:/opt/ncs/ncs-5.3.6/lib:/opt/ncs/ncs-5.3.6/lib:/opt/ncs/current/lib
LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:.tar=38;5;9:.tgz=38;5;9:.arc=38;5;9:.arj=38;5;9:.taz=38;5;9:.lha=38;5;9:.lz4=38;5;9:.lzh=38;5;9:.lzma=38;5;9:.tlz=38;5;9:.txz=38;5;9:.tzo=38;5;9:.t7z=38;5;9:.zip=38;5;9:.z=38;5;9:.Z=38;5;9:.dz=38;5;9:.gz=38;5;9:.lrz=38;5;9:.lz=38;5;9:.lzo=38;5;9:.xz=38;5;9:.bz2=38;5;9:.bz=38;5;9:.tbz=38;5;9:.tbz2=38;5;9:.tz=38;5;9:.deb=38;5;9:.rpm=38;5;9:.jar=38;5;9:.war=38;5;9:.ear=38;5;9:.sar=38;5;9:.rar=38;5;9:.alz=38;5;9:.ace=38;5;9:.zoo=38;5;9:.cpio=38;5;9:.7z=38;5;9:.rz=38;5;9:.cab=38;5;9:.jpg=38;5;13:.jpeg=38;5;13:.gif=38;5;13:.bmp=38;5;13:.pbm=38;5;13:.pgm=38;5;13:.ppm=38;5;13:.tga=38;5;13:.xbm=38;5;13:.xpm=38;5;13:.tif=38;5;13:.tiff=38;5;13:.png=38;5;13:.svg=38;5;13:.svgz=38;5;13:.mng=38;5;13:.pcx=38;5;13:.mov=38;5;13:.mpg=38;5;13:.mpeg=38;5;13:.m2v=38;5;13:.mkv=38;5;13:.webm=38;5;13:.ogm=38;5;13:.mp4=38;5;13:.m4v=38;5;13:.mp4v=38;5;13:.vob=38;5;13:.qt=38;5;13:.nuv=38;5;13:.wmv=38;5;13:.asf=38;5;13:.rm=38;5;13:.rmvb=38;5;13:.flc=38;5;13:.avi=38;5;13:.fli=38;5;13:.flv=38;5;13:.gl=38;5;13:.dl=38;5;13:.xcf=38;5;13:.xwd=38;5;13:.yuv=38;5;13:.cgm=38;5;13:.emf=38;5;13:.axv=38;5;13:.anx=38;5;13:.ogv=38;5;13:.ogx=38;5;13:.aac=38;5;45:.au=38;5;45:.flac=38;5;45:.mid=38;5;45:.midi=38;5;45:.mka=38;5;45:.mp3=38;5;45:.mpc=38;5;45:.ogg=38;5;45:.ra=38;5;45:.wav=38;5;45:.axa=38;5;45:.oga=38;5;45:.spx=38;5;45:*.xspf=38;5;45:
MAIL=/var/spool/mail/admin
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/admin/.local/bin:/home/admin/bin
PWD=/etc/profile.d
PACKAGES_DIR=/var/opt/ncs/packages
LANG=en_US.UTF-8
SELINUX_LEVEL_REQUESTED=
HISTCONTROL=ignoredups
NCS_DIR=/opt/ncs/ncs-5.3.6
SHLVL=1
HOME=/home/admin
PYTHONPATH=/opt/ncs/ncs-5.3.6/src/ncs/pyapi:/opt/ncs/ncs-5.3.6/src/ncs/pyapi:/opt/ncs/ncs-5.3.6/src/ncs/pyapi:/opt/ncs/ncs-5.3.6/src/ncs/pyapi:/opt/ncs/current/src/ncs/pyapi
LOGNAME=admin
SSH_CONNECTION=192.168.22.35 39706 192.168.22.80 22
LC_CTYPE=UTF-8
LESSOPEN=||/usr/bin/lesspipe.sh %s
XDG_RUNTIME_DIR=/run/user/1000
_=/usr/bin/env
[admin@nso5-srv1 profile.d]$ which erlc
/usr/bin/erlc
[admin@nso5-srv1 profile.d]$ cd /home/admin/Lux/
[admin@nso5-srv1 Lux]$ ll
total 352
drwxrwxr-x. 13 admin admin 4096 Jun 27 21:46 lux-master
-rw-r--r--. 1 admin admin 355962 Jul 4 11:37 lux-master.zip
[admin@nso5-srv1 Lux]$ cd lux-master
[admin@nso5-srv1 lux-master]$ ll
total 212
-rw-rw-r--. 1 admin admin 264 Jun 27 21:46 AUTHORS.md
-rw-rw-r--. 1 admin admin 3661 Jun 27 21:46 INSTALL.md
-rw-rw-r--. 1 admin admin 563 Jun 27 21:46 LICENSE
-rw-rw-r--. 1 admin admin 2814 Jun 27 21:46 Makefile
-rw-rw-r--. 1 admin admin 10813 Jun 27 21:46 README.md
-rw-rw-r--. 1 admin admin 2147 Jun 27 21:46 README.md.src
drwxrwxr-x. 2 admin admin 17 Jun 27 21:46 bin
drwxrwxr-x. 2 admin admin 38 Jun 27 21:46 c_src
-rw-rw-r--. 1 admin admin 2408 Jun 27 21:46 configure.in
drwxrwxr-x. 2 admin admin 4096 Jun 27 21:46 doc
drwxrwxr-x. 2 admin admin 6 Jun 27 21:46 ebin
drwxrwxr-x. 2 admin admin 25 Jun 27 21:46 emacs
drwxrwxr-x. 2 admin admin 176 Jun 27 21:46 examples
-rw-rw-r--. 1 admin admin 1602 Jun 27 21:46 include.mk.in
-rw-rw-r--. 1 admin admin 157546 Jun 27 21:46 lux.html
drwxrwxr-x. 3 admin admin 51 Jun 27 21:46 priv
drwxrwxr-x. 2 admin admin 4096 Jun 27 21:46 src
drwxrwxr-x. 6 admin admin 4096 Jun 27 21:46 test
drwxrwxr-x. 4 admin admin 107 Jun 27 21:46 tutorial
drwxrwxr-x. 4 admin admin 36 Jun 27 21:46 vim
-rw-rw-r--. 1 admin admin 182 Jun 27 21:46 vsn.mk
[admin@nso5-srv1 lux-master]$ autoconf
[admin@nso5-srv1 lux-master]$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for dup2... yes
checking for select... yes
checking for erl... /usr/bin/erl
checking for erlc... /usr/bin/erlc
checking for markdown... no
configure: creating ./config.status
config.status: creating include.mk
configure: creating ./config.status
config.status: creating include.mk
[admin@nso5-srv1 lux-master]$ make
make[1]: Entering directory /home/admin/Lux/lux-master/src' "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_args.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_case.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_debug.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_diff.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_annotate.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_history.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_parse.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_html_utils.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_interpret.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_junit.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_log.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_main.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_parse.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_product.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_shell.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_suite.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_tap.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_trace.erl "/usr/bin/erlc" +warnings_as_errors +warn_unused_vars +debug_info -o ../ebin lux_utils.erl sed -e "s/%VSN%/2.8.1/g" < lux.app.src > ../ebin/lux.app make[1]: Leaving directory /home/admin/Lux/lux-master/src'
make[1]: Entering directory /home/admin/Lux/lux-master/c_src' gcc -o ../priv/bin/runpty -g -O2 -Wall runpty.c runpty.c: In function 'main': runpty.c:460:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[1]: Leaving directory /home/admin/Lux/lux-master/c_src'
[admin@nso5-srv1 lux-master]$ which lux
/usr/bin/which: no lux in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/admin/.local/bin:/home/admin/bin)
[admin@nso5-srv1 lux-master]$ /usr/local/bin/lux
-bash: /usr/local/bin/lux: No such file or directory
[admin@nso5-srv1 lux-master]$

now the status is that the /usr/local/bin/lux was not created
now im on stuck

@NicoCisco
Copy link
Author

ok i have another update i make this :
[admin@nso5-srv1 lux-master]$ sudo make install
[sudo] password for admin:
install: missing destination file operand after '/usr/local/lib/lux/tutorial/chatty/ebin'
Try 'install --help' for more information.
install: missing destination file operand after '/usr/local/lib/lux/tutorial/support'
Try 'install --help' for more information.
install -d -m755 /usr/local/lib/lux
install -m644
LICENSE AUTHORS.md README.md INSTALL.md lux.html
/usr/local/lib/lux
install -d -m755 /usr/local/lib/lux/bin
install -m755 bin/lux /usr/local/lib/lux/bin
install -d -m755 /usr/local/bin
ln -s /usr/local/lib/lux/bin/lux /usr/local/bin/lux
ln: failed to create symbolic link '/usr/local/bin/lux': File exists
make: *** [install] Error 1
[admin@nso5-srv1 lux-master]$ /usr/local/bin/lux

FATAL ERROR: error:{case_clause,
{error,"../../../../usr/local/lib/lux/priv/luxcfg",
<<"../../../../usr/local/lib/lux/priv/luxcfg: no such file or directory">>}}
[{lux_main,run,4,[{file,"lux_main.erl"},{line,486}]},
{lux_escript,main,1,[{file,"/usr/local/bin/lux"},{line,48}]},
{escript,run,2,[{file,"escript.erl"},{line,747}]},
{escript,start,1,[{file,"escript.erl"},{line,277}]},
{init,start_it,1,[]},
{init,start_em,1,[]}]
[admin@nso5-srv1 lux-master]$

now seems that luxcfg is missing but is ok right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants