flrc
flrc copied to clipboard
How about use Travis-CI?
How about use Travis-CI?
https://travis-ci.org/
It's useful for following purpose:
- Keep quality of software stack in daily commits
- External developer understand how to build it
Best regards, Kiwamu Okabe
Thanks, that is a good suggestion. I'd be happy to accept a pull request if someone is willing to step in to help. The setup probably needs a binary package of the patched GHC to be available somewhere just to save time.
I'd be happy to accept a pull request if someone is willing to step in to help.
Thanks. I'll try to do that. However my build stops with following log:
$ pwd
/home/kiwamu/src/flrc-lib
$ ./bootstrap.sh
configure.ac:23: installing './compile'
configure.ac:70: installing './config.guess'
configure.ac:70: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
pgc/src/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
pgc/src/Makefile.am: installing './depcomp'
pillar2c/src/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
configure.ac: installing './ylwrap'
prt/src/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
tgc/src/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
toolkit/future/Makefile.am:3: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
$ ./configure
--snip--
config.status: creating toolkit/future/Makefile
config.status: creating include/flrclibconfig.h
config.status: executing depfiles commands
$ make
--snip--
In file included from pillar2c_yacc.yy:18:0:
../../include/pillar2c/pillar2c.ast.h:38320:32: error: cannot convert ‘bool’ to ‘type_specifier*’ in return
return false;
^~~~~
pillar2c_yacc.yy: In function ‘int check_type(const char*, unsigned int)’:
pillar2c_yacc.yy:3417:27: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
id = yylval.str = "_pillar2c_Complex";
^~~~~~~~~~~~~~~~~~~
Makefile:428: recipe for target 'pillar2c_yacc.o' failed
make[2]: *** [pillar2c_yacc.o] Error 1
make[2]: Leaving directory '/home/kiwamu/src/flrc-lib/pillar2c/src'
Makefile:335: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/kiwamu/src/flrc-lib/pillar2c'
Makefile:423: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
I'm using Debian GNU/Linux sid amd64.
Also, flrc
needs flrc-lib
...
$ pwd
/home/kiwamu/src/flrc
$ ./bootstrap.sh
--snip--
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FLRC_LIB... no
configure: error: Package requirements (flrc-lib) were not met:
No package 'flrc-lib' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FLRC_LIB_CFLAGS
and FLRC_LIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
@master-q Please get the latest version of flrc-lib and try the build again.
Following error occurs:
In file included from pillar2c_yacc.yy:18:0:
../../include/pillar2c/pillar2c.ast.h: In member function ‘virtual primary_expression* postfix_expression::is_simple_pe()’:
../../include/pillar2c/pillar2c.ast.h:3039:16: error: cannot convert ‘bool’ to ‘primary_expression*’ in return
return false;
^~~~~
../../include/pillar2c/pillar2c.ast.h: In member function ‘virtual primary_expression* postfix_expression_postfix_expression_dot_identifier::is_simple_pe()’:
../../include/pillar2c/pillar2c.ast.h:3279:16: error: cannot convert ‘bool’ to ‘primary_expression*’ in return
return false;
^~~~~
../../include/pillar2c/pillar2c.ast.h: In member function ‘virtual primary_expression* postfix_expression_postfix_expression_ptr_op_identifier::is_simple_pe()’:
../../include/pillar2c/pillar2c.ast.h:3333:16: error: cannot convert ‘bool’ to ‘primary_expression*’ in return
return false;
^~~~~
@master-q Please try again. I guess what happened is that a long time ago there was an API change for some functions to return a pointer instead of a Boolean. In some places the original "return false" was left and I guess with less pedantic compilers that "false" is 0 and "NULL" is 0 and so this worked.
You patch does make sense! However following error occurs on flrc
side:
mlton @MLton -- -verbose 1 -runtime 'use-mmap true' -codegen native -native-split 900000 -mlb-path-map /home/kiwamu/src/flrc/sml-lib/mlb-path-map -const 'Exn.keepHistory true' -stop g hrc.mlb && \
mlton @MLton -- -verbose 1 -runtime 'use-mmap true' -codegen native -native-split 900000 -mlb-path-map /home/kiwamu/src/flrc/sml-lib/mlb-path-map -const 'Exn.keepHistory true' -output ../bin/hrc hrc.*.c hrc.*.s && \
rm -f hrc.*.c hrc.*.s
MLton 20130715 (built Fri Dec 23 23:55:28 UTC 2016 on x86-ubc-01)
MLton starting
Compile SML starting
pre codegen starting
pre codegen finished in 71.33 + 35.71 (33% GC)
amd64 code gen starting
Killed
hrc-makefile.inc:309: recipe for target 'bin/hrc' failed
make: *** [bin/hrc] Error 137
I remotely remember seeing that "mlton got killed" problem before on windows, but never on Linux. Perhaps more verbosity could help show a better trace? You can modify line 242 in hrc-makefile.inc
to increase verbosity from 1 to 2 or 3, and post what happens then.
BTW, how big is your memory? I had no problem compiling hrc in a VM of 4GB mem.
I think I remember a lot of mlton memory problems, even on Linux. As I recall, there was some environment variables or compile option to specify a larger size.
Thanks for your advice. I get success with my desktop PC having 16GB memory without swap.
MLton 20130715 (built Fri Dec 23 23:55:28 UTC 2016 on x86-ubc-01)
MLton starting
Compile SML starting
pre codegen starting
pre codegen finished in 46.79 + 14.34 (23% GC)
amd64 code gen starting
amd64 code gen finished in 79.14 + 1.78 (2% GC)
Compile SML finished in 125.96 + 16.12 (11% GC)
MLton finished in 125.96 + 16.12 (11% GC)
MLton 20130715 (built Fri Dec 23 23:55:28 UTC 2016 on x86-ubc-01)
MLton starting
Compile and Assemble starting
gcc -std=gnu99 -c -fPIC -DPIC -I/usr/lib/mlton/targets/self/include \
-I/usr/lib/mlton/include -O1 -fno-common -fno-strict-aliasing \
-fomit-frame-pointer -w -m64 -fstack-protector-strong -o \
/tmp/file17jU3c.o hrc.4.c
gcc -c -m64 -o /tmp/filemRxujo.o hrc.0.s
gcc -c -m64 -o /tmp/fileqR3a00.o hrc.1.s
gcc -c -m64 -o /tmp/fileniLlLg.o hrc.2.s
gcc -c -m64 -o /tmp/fileRgIqhn.o hrc.3.s
Compile and Assemble finished in 13.62 + 0.00 (0% GC)
Link starting
gcc -o ../bin/hrc /tmp/file17jU3c.o /tmp/filemRxujo.o /tmp/fileqR3a00.o \
/tmp/fileniLlLg.o /tmp/fileRgIqhn.o -L/usr/lib/mlton/targets/self \
-lmlton-pic -lgdtoa-pic -lm -lgmp -m64 -Wl,-znoexecstack,-zrelro
Link finished in 0.60 + 0.00 (0% GC)
MLton finished in 14.23 + 0.00 (0% GC)
Killed
error occurs on my notebook having 8GB memory without swap. And also that time, I was using firefox and many application together.
I think I should update your README to explain the requirement about memory...
Also I get success on my notebook having 8GB memory without swap, while any rich application such like firefox
and emacs
.
I think the building needs 4GB memory, because I watched following dump on top
command.
Tasks: 231 total, 2 running, 229 sleeping, 0 stopped, 0 zombie
%Cpu(s): 25.3 us, 0.2 sy, 0.0 ni, 74.4 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8059296 total, 2355268 free, 4513160 used, 1190868 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 2839340 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2730 kiwamu 20 0 4057300 3.859g 15536 R 99.7 50.2 3:31.11 mlton-compile
1345 root 20 0 324768 51220 14792 S 0.7 0.6 26:54.24 Xorg
1166 colord 20 0 356656 45596 0 S 0.0 0.6 0:00.50 colord
3041 kiwamu 20 0 541944 32048 13872 S 0.3 0.4 0:46.05 gnome-terminal-
4327 kiwamu 20 0 374968 19456 364 S 0.0 0.2 0:01.09 gnome-keyring-d
2900 kiwamu 20 0 510712 19352 12480 S 0.0 0.2 0:35.80 nm-applet
2977 kiwamu 20 0 248860 19100 2296 S 0.0 0.2 0:00.94 applet.py
633 root 20 0 894348 13860 5896 S 0.0 0.2 0:59.76 NetworkManager
2898 kiwamu 20 0 509004 13384 5396 S 0.0 0.2 1:37.17 dunst
404 root 20 0 62600 11276 10632 S 0.0 0.1 0:03.44 systemd-journal
5579 kiwamu 20 0 545056 11264 0 S 0.0 0.1 0:00.24 gvfsd-http
2943 kiwamu 9 -11 376892 10244 6736 S 0.0 0.1 12:52.85 pulseaudio
1982 root 20 0 35976 9816 0 S 0.0 0.1 0:00.12 dhcpd
1240 root 20 0 827904 8664 1876 S 0.0 0.1 0:00.44 libvirtd
631 clamav 20 0 161264 7772 3232 S 0.0 0.1 0:23.10 freshclam
2976 kiwamu 20 0 228828 7504 0 S 0.0 0.1 0:00.09 python3
2887 kiwamu 20 0 171716 6396 3500 S 0.0 0.1 0:04.02 uim-toolbar
1 root 20 0 139804 6196 3784 S 0.0 0.1 0:14.70 systemd
4640 kiwamu 20 0 32848 6120 1568 S 0.0 0.1 0:05.45 screen
Totally, the flrc
's README should explain following:
- If you build
flrc
without X application, you need 8GB memory. - If you build
flrc
with X application, you need 16GB memory.
How do you think?
Thanks for providing the information. I'd say "4GB free memory", what do you think?
I think it makes sense.
@DrTodd13 I've accepted the merge request from @master-q on travis CI into both flrc and flrc-lib repos. Is there some setting in the control panel that you need to flip in order to turn them on?
I think I have enabled travis now. I triggered a build on flrc-lib and flrc and they both passed.
Thanks, @master-q and @DrTodd13 . Looks like travis is working now. I'm closing this ticket.
Hi guys -- the build is green but how about activating a cron-job so that it runs every week?
https://docs.travis-ci.com/user/cron-jobs/
With inactive projects, I worry about rot because of mutable resources accessed via the network. (Except for pinned nix-pkgs builds 😉.)
This will be trivial, but I could do a PR if preferred.
Ok, I spoke too soon -- surprisingly you can't control it in .travis.yml
, but it's only a couple clicks to set up on the web UI in Travis. I did fork and did that here to confirm:
https://travis-ci.org/iu-parfunc/flrc
@DrTodd13 can you help with the setting in Travis? Thanks!
@ninegua @rrnewton I'm out of the loop. Why can't Ryan's change just be submitted as a pull request that I can accept?
Believe it is some setting that must be done on Travis site, not in a file in the git repo itself.
Weekly cron added to flrc and flrc-lib. @ninegua @rrnewton
Great, thanks!