WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Unable to compile ezremaster due errors  (Read 1038 times)

Offline mcgiwer

  • Newbie
  • *
  • Posts: 3
Unable to compile ezremaster due errors
« on: August 29, 2022, 09:15:04 AM »
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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535

Offline mcgiwer

  • Newbie
  • *
  • Posts: 3
Re: Unable to compile ezremaster due errors
« Reply #2 on: August 29, 2022, 09:43:39 AM »
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");
« Last Edit: August 29, 2022, 10:02:01 AM by mcgiwer »

Offline mcgiwer

  • Newbie
  • *
  • Posts: 3
Re: Unable to compile ezremaster due errors
« Reply #3 on: August 29, 2022, 10:11:35 AM »
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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: Unable to compile ezremaster due errors
« Reply #4 on: August 29, 2022, 10:55:49 PM »
Those are because you removed -lfltk from the script.
The only barriers that can stop you are the ones you create yourself.