|
Post by bigbass on Aug 30, 2019 16:36:08 GMT 1
Hello Peter This is a report about non official versions of bacon but are the recent fossil versions It may be easier to report an error before it ever gets into an official bacon version beta testersattached are the logs of the terminal output during the build I use both gcc and clang that are available through apt-get to avoid confusion using xubuntu 18.04 RPI 3 32bit I detected an error with bacongui-fltk.bac that is caused by using fltk 1.3.5 which is the latest version and was able to fix it easily by adding the prefix "%s", in the fl_alert *I had the same problem with my own fltk code when using fl_message the fix was added here around line number 1789 fl_alert("%s","System error: compiler '" & arg$ & "' not found!")
fl_alert("%s","System error: no compiler provided!")
this on the low level c++ side of things of fltk not bacon the error report was this Compiler error:
Description: file 'bacongui-fltk.bac' line 1789: fl_alert("System error: compiler '" & arg$ & "' not found!") Cause: format string is not a string literal (potentially insecure) [-Wformat-security]
beta-fossil-rpi3.tar.gz (8.31 KB) Joe
|
|
|
Post by Pjot on Aug 30, 2019 21:33:53 GMT 1
Thanks Joe,
The warnings seem to come from the additional security restrictions in the ARM version of CLang. When I compile the FLTK GUI with CLang 8.0 on my x86_64 laptop I do not see any warnings at all.
I will try to emulate the ARM compiler and see if the warnings can be reproduced so I can fix them.
Best regards Peter
|
|
|
Post by vovchik on Aug 30, 2019 23:07:58 GMT 1
Dear Joe and Peter,
I can confirm Joe's PI error messages. I saw them as well on my PI, using Joe's XUbuntu version.
With kind regards, vovchik
|
|
|
Post by bigbass on Aug 31, 2019 4:26:10 GMT 1
|
|
|
Post by Pjot on Aug 31, 2019 16:31:42 GMT 1
Thanks Joe, That has been very helpful. I have installed a VM with Raspberry/PI and I could reproduce the errors and warnings. So they have been fixed. To make things work correctly in Raspberry/PI, you need to run the 'configure' script as follows: Note the CXXFLAGS here, this is the important part. You can also choose to use the GTK version but then the correct libraries need to be available. So after this configure command, the compilation with Clang on the Raspberry should work fine. I have added this information to the 'README.1ST' file as well. Please let me know if the latest beta works for you. Best regards Peter
|
|
|
Post by bigbass on Sept 1, 2019 0:59:35 GMT 1
Hello Peter and vovchik Thanks for taking the time to set up a VM of the raspberry pi3 and fixing the reported error messages this is a great help to see what we are seeing on arm thanks for the feed back vovchik if you use this code below you should also get a perfectly clean build bacon seems to compile nicely with clang instead of gcc and fltk compiles cleanly with g++ will attach a tar.gz of the terminal output fossil-8-31-2019.tar.gz (3.77 KB) thanks again Joe #!/bin/bash # added bacongui-fltk # added a fix for clang and the rpi3 # the clang command line taken from the bacon source readme (for BSD)
rm -R bacon_trunk/ rm .fslckout rm bacon.fossil fossil clone http://chiselapp.com/user/bacon/repository/bacon bacon.fossil fossil open bacon.fossil cd bacon_trunk/
CC="clang" CXXFLAGS="-x c++" ./configure prefix=/usr --enable-gui-fltk
#remove an option that throws an error on clang from the Makefile
sed -i 's/-fno-var-tracking-assignments//g' Makefile
make sudo make install
|
|
|
Post by Pjot on Sept 1, 2019 8:38:32 GMT 1
Thanks Joe, That looks like a perfect build. I see that you remove the '-fno-var-tracking-assignments' argument, but I did not need to do this in the Raspberry VM. It was detected automatically and worked out of the box. Maybe because the VM has a x86_64 version of the compiler? Anyway, good that the warnings now have been ironed out BR Peter
|
|
|
Post by bigbass on Oct 15, 2019 12:35:33 GMT 1
Good news all is fine using the latest fossil build SHA1: baa2d7e239903a87431c318056c4935bd892d388 User & Date: peter on 2019-10-12 18:31:21 and the latest rasbian official version that has gcc (Raspbian 8.3.0-6+rpi1) 8.3.0 I still get this warning but it builds fine so want to be clear all is fine except I wanted you to be aware of the terminal output its probably the new gcc being really verbose and I just ignore it if all builds correctly P,S you commented about the gcc quirk before in another post gcc -o bacon bacon.bac.o -lbacon -L. -lm make[1]: Leaving directory '/home/pi/bacon_trunk/build' Compiler error: cat: build/: Is a directory
Description: file 'build/' line : Cause: ‘memcpy’ specified size 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=]
strip build/bacon Converting 'bacongui-gtk.bac'... done, 3478 lines were processed in 4.360 seconds. Compiling 'bacongui-gtk.bac'... make[1]: Entering directory '/home/pi/bacon_trunk/build' gcc -g -O2 -fno-var-tracking-assignments -c bacongui-gtk.bac.c gcc -o bacongui-gtk bacongui-gtk.bac.o -lbacon -L. -lm -L. -ldl make[1]: Leaving directory '/home/pi/bacon_trunk/build' Done, program 'bacongui-gtk' ready. INCLUDED the config.log config.log.tar.gz (9.07 KB) Joe
|
|
|
Post by Pjot on Oct 17, 2019 20:05:08 GMT 1
Thanks Joe,
The compile error is caused by the C code for the EXEC$ function. Though the C code actually prevents bad things to happen, GCC still thinks there is an issue with int and signed int.
The fix was making sure the argument in the 'memcpy' function is always a positive value, by surrounding it with the 'abs' function from libm.
Compiling on your RPI should now pass without any warnings or errors.
BR Peter
|
|
|
Post by bigbass on Oct 18, 2019 6:21:23 GMT 1
Thanks Peter a perfect build with gcc 8.3 ! I attached the terminal out and the config.log so that you would have some feedback from a different machine (RPI3) RPI-BACON.tar.gz (12.56 KB) as always thanks for your speedy fixes and your detailed tech data right to the point explaining the why Joe
|
|
|
Post by bigbass on Nov 2, 2019 22:43:29 GMT 1
Hello Peter progress report with latest fossil it builds but I now get these warnings all with line 184 echo ${g_ALL_MAIN_VARS[${RECORD}${VAR}]} Congratulations, all requirements are met!
- Makefile created. - Using '/bin/bash' to compile BaCon. - Creating BaConGUI for GTK.
Now run 'make' and 'make install' to build and install BaCon.
root@raspberrypi:/home/pi/bacon_trunk# make rm -f build/* build-cpp/* /bin/bash ./bacon.sh -a -c gcc -o "-g -O2 -fno-var-tracking-assignments" -r ranlib -d build bacon.bac Converting 'bacon.bac'... 318./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 2123./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 2145./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 2303./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 2396./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 4894./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript ./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 4950./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 6747./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 7097./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 9772./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 9813./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 9817./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 9821./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... 9825./bacon.sh: line 184: g_ALL_MAIN_VARS: bad array subscript Converting 'bacon.bac'... done, 9925 lines were processed in 1241 seconds. New BaCon archive requested! Creating... can we just ignore that? here is the full terminal output rpi-fossil.txt (23.33 KB) nice we dont need to compress files anymore with a .txt suffix Joe
|
|
|
Post by Pjot on Nov 3, 2019 9:14:21 GMT 1
Thanks Joe!
Well, yes we can ignore it - your build will be fine.
However, it looks ugly, so I had to fix it. The reason for this BASH warning is that the associative array index itself is empty. So I added a simple check in the shell version to make sure the index has a value.
Now your build with BASH should be working without warnings.
BR Peter
|
|