WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: flwm won't compile  (Read 4011 times)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
flwm won't compile
« on: June 26, 2015, 07:10:50 PM »
Good afternoon everyone!  I was working on some minor edits to the flwm source code and when I went to compile it, it errored out but didn't give any helpful info on why it failed.  Just to test, I attempted to compile the official source (version 1.02) and it bombed the same way.  I then decided to see if the TC version had any patches that should be applied and to my surprise I see that the version in the TC repo is version 1.14.  I attempted to compile that version using the accompanying compile script.  This one bombed too.  Couple of questions...

1) What patches have been applied from the original version (1.02) and the TC version (1.14)?

2) I have included the compile script and the output below.  Does anyone have any ideas?  I have installed 'compiletc', 'xorg-proto', and 'fltk-1.3-dev'.

Thanks,
Dave



Compile Script:
#!/bin/sh
for C in "main.C" "Frame.C" "Rotated.C" "Menu.C" "FrameWindow.C" "Desktop.C" "Hotkeys.C"
do
   g++ -mtune=generic -Os -fno-exceptions -fno-rtti -fpic -c "$C"
done
g++ -lfltk -lfltk_images -lfltk_forms -lpng -o flwm main.o Frame.o Rotated.o Menu.o FrameWindow.o Desktop.o Hotkeys.o
strip flwm


Output:
main.C: In member function 'virtual void Fl_Root::show()':
main.C:56:19: error: incomplete type 'Fl_X' used in nested name specifier
     if (!shown()) Fl_X::set_xid(this, RootWindow(fl_display, fl_screen));
                   ^
main.C: In function 'int flwm_event_handler(int)':
main.C:127:2: warning: 'KeySym XKeycodeToKeysym(Display*, KeyCode, int)' is deprecated (declared at /usr/local/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
  XKeycodeToKeysym(fl_display, fl_xevent->xkey.keycode, 0);
  ^
main.C:127:57: warning: 'KeySym XKeycodeToKeysym(Display*, KeyCode, int)' is deprecated (declared at /usr/local/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
  XKeycodeToKeysym(fl_display, fl_xevent->xkey.keycode, 0);
                                                         ^
Frame.C: In constructor 'Frame::Frame(Window, XWindowAttributes*)':
Frame.C:278:3: error: incomplete type 'Fl_X' used in nested name specifier
   Fl_X::set_xid(this, XCreateWindow(fl_display,
   ^
Rotated.C: In function 'void setrotfont(int)':
Rotated.C:364:30: error: 'fl_xfont' was not declared in this scope
     if (font->xfontstruct == fl_xfont && font->dir == dir) return;
                              ^
Rotated.C:367:35: error: 'fl_xfont' was not declared in this scope
   font = XRotLoadFont(fl_display, fl_xfont, dir);
                                   ^
g++: error: main.o: No such file or directory
g++: error: Frame.o: No such file or directory
g++: error: Rotated.o: No such file or directory
strip: 'flwm': No such file

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: flwm won't compile
« Reply #1 on: June 26, 2015, 08:30:53 PM »
Hi wysiwyg
Quote
... and 'fltk-1.3-dev'.
Try removing fltk-1.3-dev  and  fltk-1.3.tcz  and install  fltk_base-dev.tcz  and  fltk-1.1.10.tcz  instead.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: flwm won't compile
« Reply #2 on: June 27, 2015, 03:42:24 AM »
The flwm source is here:

http://git.tinycorelinux.net/index.cgi?url=flwm/

We'd be interested to hear of any possible edits.
« Last Edit: June 27, 2015, 04:07:31 AM by Juanito »

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: flwm won't compile
« Reply #3 on: June 27, 2015, 10:10:22 AM »
Hi wysiwyg
Quote
... and 'fltk-1.3-dev'.
Try removing fltk-1.3-dev  and  fltk-1.3.tcz  and install  fltk_base-dev.tcz  and  fltk-1.1.10.tcz  instead.

I couldn't remove fltk-1.3.tcz as thats the window manager for the environment that I'm building in.  Plus that should not have any effect when compiling a new flwm since it doesn't contain any dev files.  I did however install fltk-1.1.10-dev.tcz (there isn't any package under the name fltk_base-dev.tcz) and it seems to have reduced the number of errors, but not eliminate the the program from failing to compile.  Below is the updated output from the attempt using the 1.14 version of the flwm source code as found in the TC repo.

main.C: In function 'int flwm_event_handler(int)':
main.C:127:2: warning: 'KeySym XKeycodeToKeysym(Display*, KeyCode, int)' is deprecated (declared at /usr/local/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
  XKeycodeToKeysym(fl_display, fl_xevent->xkey.keycode, 0);
  ^
main.C:127:57: warning: 'KeySym XKeycodeToKeysym(Display*, KeyCode, int)' is deprecated (declared at /usr/local/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
  XKeycodeToKeysym(fl_display, fl_xevent->xkey.keycode, 0);
                                                         ^
/usr/local/bin/ld: main.o: undefined reference to symbol 'XConfigureWindow'
/usr/local/lib/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
strip: 'flwm': No such file


I have verified that gcc is installed, so I'm not sure what is going on with the 'collect2' error.  Perhaps it is a chained error from one of the previous ones.

It's also worth nothing that the compile script for flwm as found in the 32bit repo (although compiling is for 64bit) is using the fltk-1.3-dev.tcz file (http://tinycorelinux.net/6.x/x86/tcz/src/flwm/compile_flwm).

Dave
« Last Edit: June 27, 2015, 10:15:29 AM by wysiwyg »

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: flwm won't compile
« Reply #4 on: June 27, 2015, 10:21:41 AM »
The flwm source is here:

http://git.tinycorelinux.net/index.cgi?url=flwm/

We'd be interested to hear of any possible edits.

Thanks for the link Juanito.  Is that version of source any different than the 1.14 found in the repo?  If not, is there a place that I can grab a tgz of the files on the git?  Do you have a better compile script that the one found in the repo as it looks like you are the package maintainer.

Thanks,
Dave

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: flwm won't compile
« Reply #5 on: June 27, 2015, 10:39:49 AM »
@Juanito
I just ended up pulling each file down from your referenced link (would be much better to have a tgz file) and attempted to recompile again.  Still no go...  Below is the snipped output from the attempt.

main.C:(.text._ZL10initializev+0x70): undefined reference to `Fl_Window::cursor(Fl_Cursor, Fl_Color, Fl_Color)'
main.C:(.text._ZL10initializev+0x89): undefined reference to `Fl::set_font(Fl_Font, char const*)'
main.C:(.text._ZL10initializev+0x98): undefined reference to `Fl::set_color(Fl_Color, unsigned int)'
/tmp/ccJnyeF0.o: In function `color_setup(Fl_Color, char const*, unsigned long)':
main.C:(.text._ZL11color_setup8Fl_ColorPKcm+0x7c): undefined reference to `Fl::set_color(Fl_Color, unsigned int)'
/tmp/ccJnyeF0.o: In function `main':
main.C:(.text.main+0xc7): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
/tmp/ccJnyeF0.o:(.rodata._ZTI7Fl_Root[_ZTI7Fl_Root]+0x10): undefined reference to `typeinfo for Fl_Window'
collect2: error: ld returned 1 exit status

Still no clue about that collect2 error as gcc is installed.

Thanks,
Dave

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: flwm won't compile
« Reply #6 on: June 27, 2015, 12:01:28 PM »
I just tried it for myself - see slightly updated instructions at:

http://tinycorelinux.net/6.x/x86_64/tcz/src/flwm/compile_flwm

..and it works fine (albeit with a bunch of warning messages).

As per the bottom left hand corner of the git page, if you'd like to download the source, use:
Code: [Select]
$ git clone http://git.tinycorelinux.net/flwm

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: flwm won't compile
« Reply #7 on: June 28, 2015, 09:45:15 AM »
Good morning all!  I was able to give this another go this morning with the updated config script and it seems everything works as designed, thanks Juanito.  It looked like I was missing the Xorg-7.7-dev package during my compiling (and possible some compile flags).  I would like to mention that the script should also add in a tce-load call for curl as it bombed without it (dependency for git it appears).

Also, I don't use git so it was a little unfamiliar to me, but it seems to be working now.  Thanks again!

Dave