Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: mbertrand on July 28, 2017, 12:42:22 PM

Title: compiling FLWM not working
Post by: mbertrand on July 28, 2017, 12:42:22 PM
I'm trying to recompile FLWM and I'm getting these errors:
Rotated.C: In function 'void setrotfont(int)':
Rotated.C:364:46: error: 'fl_X_core_font' was not declared in this scope
Rotated.C:367:50: error: 'fl_X_core_font' was not declared in this scope

I have compiletc git fltk-1.3-dev Xorg-7.7-dev sstrip
I download source from http://git.tinycorelinux.net/flwm
I run ./compileit and get those errors
Title: Re: compiling FLWM not working
Post by: curaga on July 29, 2017, 02:42:38 AM
Maybe your fltk-1.3.tcz or -dev is out of date? Or are you trying to compile on an older TC? That particular feature was added in fltk 1.3.4.
Title: Re: compiling FLWM not working
Post by: Juanito on July 30, 2017, 01:13:17 AM
There's also a patch for it here:

http://www.tinycorelinux.net/7.x/x86/tcz/src/fltk/

..are you using a tc version earlier than 7.x?
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 07:01:41 AM
I'm using Version 5.4. Where can I get  the 1.3.4.tcz? Should I get flwm from TC or from original?
Currently I'm compiling against http://git.tinycorelinux.net/flwm and fltk-1.3-dev.tcz.
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 07:33:50 AM
So I got fltk from http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/ and this is version 1.3.4.
I'm using flwm from http://git.tinycorelinux.net/flwm and getting many undefined references errors.
Title: Re: compiling FLWM not working
Post by: Juanito on July 31, 2017, 07:52:28 AM
the instructions here work:

http://tinycorelinux.net/7.x/x86/tcz/src/flwm/compile_flwm
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 07:57:05 AM
Actually this is what I followed. I have to add that I'm on TC version 5.4 but have all required dependencies Or I think I do
Title: Re: compiling FLWM not working
Post by: Juanito on July 31, 2017, 08:26:23 AM
It could be an issue with gcc-4.7.2, but I kind of doubt it since I compiled flwm on tc-5.x back then - I compiled flwm with tc-8.x 15 minutes ago and it worked fine...
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 09:14:22 AM
I think i see my problem but not sure the best way to deal with it. I'm on TC 5.4 and I need to stay at this version for now and I've added the fltk 1.3 -dev to build but my TC is still using fltk1.1. `fltk-config --ldflags --use-images` is telling me that it should link to -lfltk and this points to /tmp/tcloop/fltk-1.1.10/usr/local/lib/libfltk.so. So it is pointing to 1.1 and not the 1.3 I've added to build.

I have this dependency because like I mentioned I'm developing on TC 5.4 and it has for runtime FLTK 1.1.
Title: Re: compiling FLWM not working
Post by: curaga on July 31, 2017, 10:04:57 AM
Using extensions from newer versions of TC will likely not work, since they were compiled against newer libraries.

Replace -lfltk with the full path to the libfltk you want (replace the command with its output first). If you have nothing else using fltk 1.3, you could link flwm statically.

Alternatively, use an older, 1.1-compatible flwm from the git history.
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 10:19:12 AM
Thanks this is what I'm working one.
Title: Re: compiling FLWM not working
Post by: mbertrand on July 31, 2017, 12:44:19 PM

I'm down to this one error:
/usr/local/lib/libfltk_images.so.1.3: undefined reference to `operator delete(void*, unsigned int)@CXXABI_1.3.9'

I'm stuck now.
Title: Re: compiling FLWM not working
Post by: curaga on August 01, 2017, 12:37:44 AM
That's one of the "using extensions from a newer TC" issues. No way around it except compiling fltk 1.3 on your system.
Title: Re: compiling FLWM not working
Post by: mbertrand on August 01, 2017, 05:43:07 AM
My goal here was to disable the CTRL-F# shortcuts. I guess there is no other way around this other then recompiling FLWM.
Also I'm confused between FLWM and FLWM_topside? Is topside a modified FLWM?
Title: Re: compiling FLWM not working
Post by: Rich on August 01, 2017, 05:49:47 AM
Hi mbertrand
FLWM_topside has the windows titlebar and controls along the top edge while FLWM has them along the left edge.
Title: Re: compiling FLWM not working
Post by: mbertrand on August 01, 2017, 05:58:26 AM
Oh that's good to know thanks!
Title: Re: compiling FLWM not working
Post by: mbertrand on August 01, 2017, 09:03:11 AM
Ok I managed to recompile FLTK 1.3.4 and recompile TCs FLWM against these libs on my TinyCore 5.4. But I have other dependencies like xprogs and wbar that still need the old fltk1.1.10. So I have to versions of fltk. I would like to try maybe to compile an older source of FLMW that is compiltable with FLTK 1.1.10. Anyone know where I can find it?
Title: Re: compiling FLWM not working
Post by: curaga on August 01, 2017, 11:31:48 AM
It's all in the git history. If you have a git clone, you can check out different versions with git commands. If you downloaded a zip/tgz from github, you can do that for the old versions too - click on "27 commits", on the commit you want click the "<>" on the right, then download the zip like you did before.
Title: Re: compiling FLWM not working
Post by: mbertrand on August 02, 2017, 06:00:32 AM
Ok great thanks!
Title: Re: compiling FLWM not working
Post by: ipmeel on June 26, 2018, 11:30:24 PM
I have tried to compile on TC9x and TC8x.
Sources...
http://git.tinycorelinux.net/flwm (http://git.tinycorelinux.net/flwm)
https://github.com/tinycorelinux/flwm (https://github.com/tinycorelinux/flwm)
Loaded extensions...
Code: [Select]
tce-load -i git fltk-1.3-dev Xorg-7.7-dev sstrip compiletcApplied patch
http://www.tinycorelinux.net/8.x/x86/tcz/src/fltk/ (http://www.tinycorelinux.net/8.x/x86/tcz/src/fltk/)
Commands..
http://tinycorelinux.net/7.x/x86/tcz/src/flwm/compile_flwm (http://tinycorelinux.net/7.x/x86/tcz/src/flwm/compile_flwm)
getting following errors...
Code: [Select]
/tmp/ccnotk6r.ltrans4.ltrans.o: In function `request_menu_refresh(int)':
<artificial>:(.text+0xb): undefined reference to `wmx_time'
/tmp/ccnotk6r.ltrans4.ltrans.o: In function `arg(int, char**, int&)':
<artificial>:(.text+0x15a): undefined reference to `fl_open_display()'
<artificial>:(.text+0x16a): undefined reference to `fl_display'
<artificial>:(.text+0x172): undefined reference to `XGetVisualInfo'
<artificial>:(.text+0x17c): undefined reference to `fl_visual'
<artificial>:(.text+0x18c): undefined reference to `Fl::fatal'
<artificial>:(.text+0x194): undefined reference to `fl_visual'
<artificial>:(.text+0x19c): undefined reference to `fl_display'
<artificial>:(.text+0x1a4): undefined reference to `fl_screen'
...
...
/tmp/ccnotk6r.ltrans3.ltrans.o: In function `Frame::draw()':
<artificial>:(.text+0x179): undefined reference to `Fl_Window::draw()'
/tmp/ccnotk6r.ltrans3.ltrans.o: In function `Frame::set_size(int, int, int, int, int)':
<artificial>:(.text+0xa09): undefined reference to `XSync'
collect2: error: ld returned 1 exit status
Please suggest a solutions.
Title: Re: compiling FLWM not working
Post by: Juanito on June 28, 2018, 03:27:22 AM
Using the instructions here:

http://tinycorelinux.net/7.x/x86/tcz/src/flwm/compile_flwm

..things worked fine for me...
Title: Re: compiling FLWM not working
Post by: ipmeel on June 29, 2018, 08:25:23 PM
Hi Juanito,
I have tried many option, but without a success...
Command..
Code: [Select]
tc@box:~/flwm$ g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_f
orms.so.1.3 /usr/local/lib/libfltk.so.1.3  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
The error...
Code: [Select]
/usr/local/bin/ld: /tmp/ccgYXdlb.ltrans0.ltrans.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
Please guide.
Title: Re: compiling FLWM not working
Post by: Rich on June 29, 2018, 09:22:56 PM
Hi ipmeel
Try adding:
Code: [Select]
-lX11to your command.
Title: Re: compiling FLWM not working
Post by: ipmeel on June 29, 2018, 10:50:05 PM
Hi Rich,
Thank you very much for the hit...
Only adding "-lX11" to command has not worked.
Following command worked for me..
Code: [Select]
g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_forms.so.1.3 /usr/local/lib/libfltk.so.1.3 /usr/local/lib/libX11.so.6.3.0  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
and this also worked
Code: [Select]
g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti /usr/local/lib/libfltk_images.so.1.3 /usr/local/lib/libfltk_forms.so.1.3 /usr/local/lib/libfltk.so.1.3 -lX11  -o ./../new_flwm_topside -DTOPSIDE *.C $CXXFLAGS $LDFLAGS
The new "flwm_topside" is working fine with modified "./flwm/config.h" as
Code: [Select]
#define DESKTOP 0
But when "./flwm/config.h" is modified as (either or both)..
Code: [Select]
#define WMX_MENU_ITEMS 0
#define XTERM_MENU_ITEM 0
Result: no title bar on GUI windows.
Also, may I ask how to disable "Ctrl+Esc" for closing/terminating GUI apps.