Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: mcgiwer on August 29, 2022, 12:15:04 PM

Title: Unable to compile ezremaster due errors
Post by: mcgiwer on August 29, 2022, 12:15:04 PM
Hello. I wanted to let know about that when I attempted to compile from the sources the ezremaster, I had recieved following g++ errors:

Code: [Select]
ezremaster.cxx: In function ‘void button_callback(Fl_Widget*, void*)’:
ezremaster.cxx:29:22: error: ‘unlink’ was not declared in this scope
      unlink("scm.lst");
                      ^
ezremaster.cxx:19:37: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
         system("gunzip info.lst.gz");
                                     ^
ezremaster.cxx:21:33: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
         system("rm -f info.lst");
                                 ^
ezremaster.cxx:34:49: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
         system("gunzip -c scm.lst.gz > scm.lst");
                                                 ^
ezremaster.cxx:127:46: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
           system("rm -f /tmp/tmp_onboot.lst");
                                              ^
ezremaster.cxx:205:47: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
           system("rm -f /tmp/tmp_scmboot.lst");
                                               ^
ezremaster.cxx: In function ‘void make_iso_step1()’:
ezremaster.cxx:261:26: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
   system(command.c_str());
                          ^
ezremaster.cxx:336:27: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
    system(command.c_str());
                           ^
ezremaster.cxx: In function ‘void cb_extract_output(Fl_Output*, void*)’:
ezremaster.cxx:667:24: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
 system(command.c_str());
                        ^
ezremaster.cxx: In function ‘void cb_image_output(Fl_Output*, void*)’:
ezremaster.cxx:659:24: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
 system(command.c_str());
                        ^

Please fix it asap. Thanks
Title: Re: Unable to compile ezremaster due errors
Post by: Juanito on August 29, 2022, 12:41:22 PM
Did you use this?

http://tinycorelinux.net/3.x/tcz/src/ezremaster/build_ezr.sh
Title: Re: Unable to compile ezremaster due errors
Post by: mcgiwer on August 29, 2022, 12:43:39 PM
yes, but I had put some modifications to the script:

Code: [Select]
#!/bin/sh

build_dir=$(dirname $0)

fluid -c ${build_dir}/ezremaster.fl
g++ -O3 -Os -fno-exceptions -Wno-unused-result -fpic -o ${build_dir}/ezremaster ${build_dir}/ezremaster.cxx

if [ -f ${build_dir}/ezremaster ]; then strip ${build_dir}/ezremaster; chmod -vf 755 ${build_dir}/ezremaster; fi
if [ -f ${build_dir}/remaster.sh ]; then chmod -vf 755 ${build_dir}/remaster.sh; fi

if [ ! -d ${build_dir}/share/applications ]; then mkdir -pvm 777 ${build_dir}/share/applications; fi
if [ ! -d ${build_dir}/share/pixmaps ]; then mkdir -pvm 777 ${build_dir}/share/pixmaps; fi

Fix for the
Code: [Select]
ezremaster.cxx:29:22: error: ‘unlink’ was not declared in this scope  unlink("scm.lst"); error:

In the file ezlink.fl replace following line:

Code: [Select]
unlink("scm.lst");
with:

Code: [Select]
system ("unlink scm.lst");
Title: Re: Unable to compile ezremaster due errors
Post by: mcgiwer on August 29, 2022, 01:11:35 PM
Update:
After fixing the "unlink" error, I had got a new set of errors, with seem to be broken references to the generated interface items:

Due limitations of the input here, see Pastebin at: https://pastebin.com/73bQP7Jr
Title: Re: Unable to compile ezremaster due errors
Post by: curaga on August 30, 2022, 01:55:49 AM
Those are because you removed -lfltk from the script.