WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: fluff fails during make...  (Read 3595 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
fluff fails during make...
« on: July 26, 2015, 04:19:20 PM »
Hi all. Anyone who follows my posts knows i'm probably the worst compiler in TC history :)

I have an open thread on compiling some other software, but wanted more practice so decided to compile something already in the repository - fluff file manager. Also wanted to read the code, learn, maybe try some changes.

Downloaded latest/last fluff from here (page 3):
http://forum.tinycorelinux.net/index.php/topic,12928.30.html

Preparation:
- loaded compiletc, squashfs-tools, automake, fltk-1.1.10-dev
- extracted fluff_1_0_7_src.tar.gz into /tmp/fluff

Extension does not appear to require ./configure, just make. Make fails with error:
Code: [Select]
tc@box:/tmp/fluff$ make
g++ "-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" `fltk-config --cxxflags` -Wall -c fluff.cpp
fluff.cpp:580:1: warning: narrowing conversion of '255' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
 };
 ^
fluff.cpp:580:1: warning: narrowing conversion of '216' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
gcc `fltk-config --use-images --ldflags` -lfltk_images -lm fluff.o -o fluff
/usr/local/bin/ld: fluff.o: undefined reference to symbol '_Znaj@@GLIBCXX_3.4'
/usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'all' failed
make: *** [all] Error 1

A 134K fluff.o executable is, however, created. Run chmod +x fluff.o to make executable. Try to run fluff via ./fluff.o with error:
Code: [Select]
tc@box:/tmp/fluff$ ./fluff.o
./fluff.o: line 1: syntax error: unexpected word (expecting ")")

Open fluff.o via editor, first and only line:
ELFge_Filetypes_WindowD0Ev

Reviewed thread linked above (http://forum.tinycorelinux.net/index.php/topic,12928.30.html) and as per coreplayer2's post, added -lstdc++ to make file as described. More errors during make and attempting to run fluff.o resulted in the same line 1 syntax error.
Code: [Select]
tc@box:/tmp/fluff$ make
g++ "-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" `fltk-config --cxxflags` -Wall -c fluff.cpp
fluff.cpp:580:1: warning: narrowing conversion of '255' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
 };
 ^
fluff.cpp:580:1: warning: narrowing conversion of '216' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
gcc `fltk-config --use-images --ldflags` -lfltk_images -lstdc++ -lm fluff.o -o fluff
fluff.o: In function `File_Detail_List_Browser::draw()':
fluff.cpp:(.text+0x3f9): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x471): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x489): undefined reference to `fl_line(int, int, int, int)'
fluff.cpp:(.text+0x49e): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x4dd): undefined reference to `fl_polygon(int, int, int, int, int, int)'
fluff.o: In function `btnbar_help_cb()':
fluff.cpp:(.text+0x664): undefined reference to `Fl_Help_Dialog::textsize(unsigned char)'
fluff.o: In function `wait_cursor()':
fluff.cpp:(.text+0xe7e): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `normal_cursor()':
fluff.cpp:(.text+0xea5): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `Fluff_Window::enable_renaming(file_item*, int, int)':
fluff.cpp:(.text+0x428d): undefined reference to `Fl_Browser_::scrollbar_width_'
fluff.o: In function `File_Detail_List_Browser::handle(int)':
fluff.cpp:(.text+0xa339): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa34c): undefined reference to `Fl_Browser_::scrollbar_width_'
fluff.cpp:(.text+0xa3bf): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa4dc): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `Fluff_Window::handle(int)':
fluff.cpp:(.text+0xa8a8): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa975): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa9fb): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `faded(Fl_Color&, float)':
fluff.cpp:(.text+0xaac6): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.o: In function `configure_colors()':
fluff.cpp:(.text+0xab8e): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xaba4): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xabbe): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xabd7): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xabe8): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xac01): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xac1a): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xac33): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'all' failed
make: *** [all] Error 1

Restored default Makefile and as per MikeLockmoore's post, changed gcc to g++ in the Makefile. Failed result and same same line 1 syntax error when attempting to run.
Code: [Select]
tc@box:/tmp/fluff$ make
g++ "-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" `fltk-config --cxxflags` -Wall -c fluff.cpp
fluff.cpp:580:1: warning: narrowing conversion of '255' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
 };
 ^
fluff.cpp:580:1: warning: narrowing conversion of '216' from 'int' to 'char' inside { } is ill-formed in C++11 [-Wnarrowing]
g++ `fltk-config --use-images --ldflags` -lfltk_images -lm fluff.o -o fluff
fluff.o: In function `File_Detail_List_Browser::draw()':
fluff.cpp:(.text+0x3f9): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x471): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x489): undefined reference to `fl_line(int, int, int, int)'
fluff.cpp:(.text+0x49e): undefined reference to `fl_color(Fl_Color)'
fluff.cpp:(.text+0x4dd): undefined reference to `fl_polygon(int, int, int, int, int, int)'
fluff.o: In function `btnbar_help_cb()':
fluff.cpp:(.text+0x664): undefined reference to `Fl_Help_Dialog::textsize(unsigned char)'
fluff.o: In function `wait_cursor()':
fluff.cpp:(.text+0xe7e): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `normal_cursor()':
fluff.cpp:(.text+0xea5): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `Fluff_Window::enable_renaming(file_item*, int, int)':
fluff.cpp:(.text+0x428d): undefined reference to `Fl_Browser_::scrollbar_width_'
fluff.o: In function `File_Detail_List_Browser::handle(int)':
fluff.cpp:(.text+0xa339): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa34c): undefined reference to `Fl_Browser_::scrollbar_width_'
fluff.cpp:(.text+0xa3bf): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa4dc): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `Fluff_Window::handle(int)':
fluff.cpp:(.text+0xa8a8): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa975): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xa9fb): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.o: In function `faded(Fl_Color&, float)':
fluff.cpp:(.text+0xaac6): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.o: In function `configure_colors()':
fluff.cpp:(.text+0xab8e): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xaba4): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xabbe): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xabd7): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xabe8): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xac01): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
fluff.cpp:(.text+0xac1a): undefined reference to `Fl::get_color(Fl_Color, unsigned char&, unsigned char&, unsigned char&)'
fluff.cpp:(.text+0xac33): undefined reference to `Fl::set_color(Fl_Color, unsigned char, unsigned char, unsigned char)'
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'all' failed
make: *** [all] Error 1

Attempted to run 'make' on older fluff (v1.0.6) also failed.

Fluff was last updated to 1.0.7 by jlslegalize in 2013/10/06, who no longer works on TC. Couldn't find any old compile notes going back through TC versions 4, 5 and 6.

Mike Lockmoore did not respond to contact attempts.

Is this just how it goes when attempting to 'make' outdated software or anything else to try? Thanks.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #1 on: July 26, 2015, 07:27:46 PM »
Still trying different things, reading, trying to learn. After numerous failed alterations of the Makefile, decided to compile fluff.cpp directly. The fluff source is extracted to /tmp/fluff, contents:
Code: [Select]
tc@box:/tmp/fluff$ ls -l
total 344
-rwxr-xr-x    1 tc       staff         1828 Jul 26 16:47 Makefile
-rwxr-xr-x    1 tc       staff         1913 Feb 28  2012 build-tcz.sh
-rwxr-xr-x    1 tc       staff       225723 Jun 26  2012 fluff.cpp
-rw-r--r--    1 tc       staff         2131 Nov 10  2010 fluff.gif
-rw-r--r--    1 tc       staff         3732 Nov 10  2010 fluff.png
-rwxr-xr-x    1 tc       staff          489 Dec  2  2010 fluff_fc.sh
-rwxr-xr-x    1 tc       staff        28407 Jun 26  2012 fluff_help.htm
-rw-r--r--    1 tc       staff        64071 Jul 26 02:54 fluff_src.tar.gz
-rwx------    1 tc       staff          598 Sep 22  2010 mkdirs.sh
-rwxr--r--    1 tc       staff           69 Sep 21  2010 test.sh

Both 'gcc fluff.cpp' and 'g++ fluff.cpp' give a pile of errors without success. Here's only a small portion of the g++ output (exceeded max post size):
Code: [Select]
tc@box:/tmp/fluff$ g++ fluff.cpp
/tmp/cct1C3dp.o: In function `wait_cursor()':
fluff.cpp:(.text+0xc5): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xd4): undefined reference to `Fl::check()'
/tmp/cct1C3dp.o: In function `normal_cursor()':
fluff.cpp:(.text+0xf8): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0x110): undefined reference to `Fl::wait(double)'
/tmp/cct1C3dp.o: In function `Fl_DND_Box::handle(int)':
fluff.cpp:(.text+0x2adc): undefined reference to `Fl::add_timeout(double, void (*)(void*), void*)'
fluff.cpp:(.text+0x2af5): undefined reference to `Fl_Box::handle(int)'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::visible_lines()':
fluff.cpp:(.text+0x2be2): undefined reference to `Fl_Browser_::bbox(int&, int&, int&, int&) const'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::top_visible_line()':
fluff.cpp:(.text+0x2c4a): undefined reference to `Fl_Browser_::bbox(int&, int&, int&, int&) const'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::file_item_under_mouse(int)':
fluff.cpp:(.text+0x2c8f): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::item_first() const':
fluff.cpp:(.text+0x2ca9): undefined reference to `Fl_Browser::item_first() const'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::handle(int)':
fluff.cpp:(.text+0x2ce0): undefined reference to `Fl_Browser_::handle(int)'
/tmp/cct1C3dp.o: In function `Dir_Tree_Browser::populate()':
fluff.cpp:(.text+0x2d20): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x2fc0): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x300c): undefined reference to `Fl_Browser::select(int, int)'
/tmp/cct1C3dp.o: In function `File_Detail_List_Browser::num_selected()':
fluff.cpp:(.text+0x320e): undefined reference to `Fl_Browser::selected(int) const'
/tmp/cct1C3dp.o: In function `File_Detail_List_Browser::size_selected()':
fluff.cpp:(.text+0x3267): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0x3282): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `File_Detail_List_Browser::populate(file_item*)':
fluff.cpp:(.text+0x3307): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x335c): undefined reference to `Fl_Browser::Fl_Browser(int, int, int, int, char const*)'
fluff.cpp:(.text+0x336a): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x33ad): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x33de): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x3457): undefined reference to `Fl_Browser::insert(int, char const*, void*)'
fluff.cpp:(.text+0x349c): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x3553): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x3577): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x370d): undefined reference to `Fl_Browser::add(char const*, void*)'
/tmp/cct1C3dp.o: In function `try_assoc_app(char*, char*)':
fluff.cpp:(.text+0x38fc): undefined reference to `fl_alert(char const*, ...)'
/tmp/cct1C3dp.o: In function `OWW__control_cb(Fl_Widget*, long)':
fluff.cpp:(.text+0x3986): undefined reference to `Fl_Browser::value() const'
fluff.cpp:(.text+0x399b): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `Open_With_Window::Open_With_Window(int, int, int, int)':
fluff.cpp:(.text+0x3a8b): undefined reference to `Fl_Window::Fl_Window(int, int, int, int, char const*)'
/tmp/cct1C3dp.o: In function `Open_With_Window::~Open_With_Window()':
fluff.cpp:(.text+0x3af2): undefined reference to `Fl_Window::~Fl_Window()'
/tmp/cct1C3dp.o: In function `Open_With_Window::setup()':
fluff.cpp:(.text+0x3b9e): undefined reference to `Fl_Group::begin()'
fluff.cpp:(.text+0x3c27): undefined reference to `Fl_Check_Button::Fl_Check_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3ce9): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3d61): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3da4): undefined reference to `Fl_Widget::tooltip(char const*)'
fluff.cpp:(.text+0x3de8): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3e1d): undefined reference to `Fl_Group::end()'
/tmp/cct1C3dp.o: In function `Open_With_Window::update()':
...
fluff.cpp:(.text+0xee5b): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0xee7a): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `perform_file_copy_or_move(fileop_enum, file_item*, int)':
fluff.cpp:(.text+0xf003): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0xf01e): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0xf041): undefined reference to `Fl_Browser::select(int, int)'
fluff.cpp:(.text+0xf2bf): undefined reference to `fl_alert(char const*, ...)'
/tmp/cct1C3dp.o: In function `perform_file_delete(int)':
fluff.cpp:(.text+0xf413): undefined reference to `fl_choice(char const*, char const*, char const*, char const*, ...)'
fluff.cpp:(.text+0xf48f): undefined reference to `Fl_Browser_::deselect(int)'
fluff.cpp:(.text+0xf507): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0xf52c): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `perform_select_all()':
fluff.cpp:(.text+0xf5b2): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0xf60d): undefined reference to `Fl_Browser::select(int, int)'
fluff.cpp:(.text+0xf645): undefined reference to `Fl::wait(double)'
/tmp/cct1C3dp.o: In function `FileMenuCB(Fl_Widget*, void*)':
fluff.cpp:(.text+0xf707): undefined reference to `Fl_Button::value(int)'
fluff.cpp:(.text+0xf845): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0xf864): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0xf881): undefined reference to `Fl_Browser::select(int, int)'
fluff.cpp:(.text+0xf973): undefined reference to `fl_alert(char const*, ...)'
/tmp/cct1C3dp.o: In function `switch_directory(file_item*)':
fluff.cpp:(.text+0x102e8): undefined reference to `Fl_Menu_::clear()'
fluff.cpp:(.text+0x1031d): undefined reference to `Fl_Menu_::add(char const*)'
fluff.cpp:(.text+0x1035a): undefined reference to `Fl_Menu_::add(char const*)'
fluff.cpp:(.text+0x1037a): undefined reference to `Fl_Widget::label(char const*)'
/tmp/cct1C3dp.o: In function `dirtree_change_cb()':
fluff.cpp:(.text+0x103dc): undefined reference to `Fl_Browser::value() const'
fluff.cpp:(.text+0x10417): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `filelist_change_cb()':
fluff.cpp:(.text+0x1053f): undefined reference to `Fl_Browser::value() const'
fluff.cpp:(.text+0x1056a): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `init_dir_watching()':
fluff.cpp:(.text+0x105b8): undefined reference to `fl_alert(char const*, ...)'
/tmp/cct1C3dp.o: In function `get_file_selections()':
fluff.cpp:(.text+0x10863): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0x10888): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x1093a): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0x1095f): undefined reference to `Fl_Browser::data(int) const'
/tmp/cct1C3dp.o: In function `reselect_files(char const*)':
fluff.cpp:(.text+0x10ad3): undefined reference to `Fl_Browser::data(int) const'
...
/tmp/cct1C3dp.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x44): undefined reference to `Fl_Browser::item_select(void*, int)'
/tmp/cct1C3dp.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x48): undefined reference to `Fl_Browser::item_selected(void*) const'
/tmp/cct1C3dp.o:(.rodata._ZTI12Fluff_Window[_ZTI12Fluff_Window]+0x8): undefined reference to `typeinfo for Fl_Double_Window'
/tmp/cct1C3dp.o:(.rodata._ZTI23Manage_Filetypes_Window[_ZTI23Manage_Filetypes_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/cct1C3dp.o:(.rodata._ZTI26Manage_Associations_Window[_ZTI26Manage_Associations_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/cct1C3dp.o:(.rodata._ZTI16Open_With_Window[_ZTI16Open_With_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/cct1C3dp.o:(.rodata._ZTI17File_Props_Window[_ZTI17File_Props_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/cct1C3dp.o:(.rodata._ZTI10Fl_DND_Box[_ZTI10Fl_DND_Box]+0x8): undefined reference to `typeinfo for Fl_Box'
/tmp/cct1C3dp.o:(.rodata._ZTI12Fl_Int_Input[_ZTI12Fl_Int_Input]+0x8): undefined reference to `typeinfo for Fl_Input'
/tmp/cct1C3dp.o:(.rodata._ZTI16Fl_Multi_Browser[_ZTI16Fl_Multi_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
/tmp/cct1C3dp.o:(.rodata._ZTI15Fl_Hold_Browser[_ZTI15Fl_Hold_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
/tmp/cct1C3dp.o:(.rodata._ZTI17Fl_Select_Browser[_ZTI17Fl_Select_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
collect2: error: ld returned 1 exit status

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #2 on: July 26, 2015, 07:53:41 PM »
Renamed Makefile to disable, then just ran plain 'make fluff', with more errors (output shortened):
Code: [Select]
tc@box:/tmp/fluff$ make fluff
g++     fluff.cpp   -o fluff
/tmp/ccga4lNt.o: In function `wait_cursor()':
fluff.cpp:(.text+0xc5): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xd4): undefined reference to `Fl::check()'
/tmp/ccga4lNt.o: In function `normal_cursor()':
fluff.cpp:(.text+0xf8): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0x110): undefined reference to `Fl::wait(double)'
/tmp/ccga4lNt.o: In function `Fl_DND_Box::handle(int)':
fluff.cpp:(.text+0x2adc): undefined reference to `Fl::add_timeout(double, void (*)(void*), void*)'
fluff.cpp:(.text+0x2af5): undefined reference to `Fl_Box::handle(int)'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::visible_lines()':
fluff.cpp:(.text+0x2be2): undefined reference to `Fl_Browser_::bbox(int&, int&, int&, int&) const'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::top_visible_line()':
fluff.cpp:(.text+0x2c4a): undefined reference to `Fl_Browser_::bbox(int&, int&, int&, int&) const'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::file_item_under_mouse(int)':
fluff.cpp:(.text+0x2c8f): undefined reference to `Fl_Browser::data(int) const'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::item_first() const':
fluff.cpp:(.text+0x2ca9): undefined reference to `Fl_Browser::item_first() const'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::handle(int)':
fluff.cpp:(.text+0x2ce0): undefined reference to `Fl_Browser_::handle(int)'
/tmp/ccga4lNt.o: In function `Dir_Tree_Browser::populate()':
fluff.cpp:(.text+0x2d20): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x2fc0): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x300c): undefined reference to `Fl_Browser::select(int, int)'
/tmp/ccga4lNt.o: In function `File_Detail_List_Browser::num_selected()':
fluff.cpp:(.text+0x320e): undefined reference to `Fl_Browser::selected(int) const'
/tmp/ccga4lNt.o: In function `File_Detail_List_Browser::size_selected()':
fluff.cpp:(.text+0x3267): undefined reference to `Fl_Browser::selected(int) const'
fluff.cpp:(.text+0x3282): undefined reference to `Fl_Browser::data(int) const'
/tmp/ccga4lNt.o: In function `File_Detail_List_Browser::populate(file_item*)':
fluff.cpp:(.text+0x3307): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x335c): undefined reference to `Fl_Browser::Fl_Browser(int, int, int, int, char const*)'
fluff.cpp:(.text+0x336a): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x33ad): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x33de): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x3457): undefined reference to `Fl_Browser::insert(int, char const*, void*)'
fluff.cpp:(.text+0x349c): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x3553): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x3577): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x370d): undefined reference to `Fl_Browser::add(char const*, void*)'
/tmp/ccga4lNt.o: In function `try_assoc_app(char*, char*)':
fluff.cpp:(.text+0x38fc): undefined reference to `fl_alert(char const*, ...)'
/tmp/ccga4lNt.o: In function `OWW__control_cb(Fl_Widget*, long)':
fluff.cpp:(.text+0x3986): undefined reference to `Fl_Browser::value() const'
fluff.cpp:(.text+0x399b): undefined reference to `Fl_Browser::data(int) const'
/tmp/ccga4lNt.o: In function `Open_With_Window::Open_With_Window(int, int, int, int)':
fluff.cpp:(.text+0x3a8b): undefined reference to `Fl_Window::Fl_Window(int, int, int, int, char const*)'
/tmp/ccga4lNt.o: In function `Open_With_Window::~Open_With_Window()':
fluff.cpp:(.text+0x3af2): undefined reference to `Fl_Window::~Fl_Window()'
/tmp/ccga4lNt.o: In function `Open_With_Window::setup()':
fluff.cpp:(.text+0x3b9e): undefined reference to `Fl_Group::begin()'
fluff.cpp:(.text+0x3c27): undefined reference to `Fl_Check_Button::Fl_Check_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3ce9): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3d61): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3da4): undefined reference to `Fl_Widget::tooltip(char const*)'
fluff.cpp:(.text+0x3de8): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x3e1d): undefined reference to `Fl_Group::end()'
/tmp/ccga4lNt.o: In function `Open_With_Window::update()':
fluff.cpp:(.text+0x3f6b): undefined reference to `Fl_Widget::copy_label(char const*)'
fluff.cpp:(.text+0x3f7c): undefined reference to `Fl_Browser::clear()'
fluff.cpp:(.text+0x402c): undefined reference to `Fl_Browser::add(char const*, void*)'
fluff.cpp:(.text+0x406e): undefined reference to `Fl_Browser::data(int, void*)'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::Manage_Associations_Window(int, int, int, int)':
fluff.cpp:(.text+0x40f1): undefined reference to `Fl_Window::Fl_Window(int, int, int, int, char const*)'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::~Manage_Associations_Window()':
fluff.cpp:(.text+0x41cc): undefined reference to `Fl_Window::~Fl_Window()'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::enable_editing()':
fluff.cpp:(.text+0x4217): undefined reference to `Fl_Widget::activate()'
fluff.cpp:(.text+0x4228): undefined reference to `Fl_Widget::activate()'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::disable_editing()':
fluff.cpp:(.text+0x4249): undefined reference to `Fl_Input_::value(char const*)'
fluff.cpp:(.text+0x4262): undefined reference to `Fl_Input_::value(char const*)'
fluff.cpp:(.text+0x4273): undefined reference to `Fl_Widget::deactivate()'
fluff.cpp:(.text+0x4284): undefined reference to `Fl_Widget::deactivate()'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::show(int, char*, int*, association*)':
fluff.cpp:(.text+0x432d): undefined reference to `Fl_Window::show()'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::hide()':
fluff.cpp:(.text+0x4388): undefined reference to `Fl_Window::hide()'
/tmp/ccga4lNt.o: In function `MAW__control_cb(Fl_Widget*, long)':
fluff.cpp:(.text+0x44a7): undefined reference to `Fl_Browser::value() const'
fluff.cpp:(.text+0x44bc): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x4527): undefined reference to `Fl_Input_::value(char const*)'
fluff.cpp:(.text+0x455c): undefined reference to `Fl_Input_::value(char const*)'
fluff.cpp:(.text+0x4587): undefined reference to `Fl_Browser::data(int) const'
fluff.cpp:(.text+0x45c5): undefined reference to `Fl_Browser::data(int) const'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::setup()':
fluff.cpp:(.text+0x4921): undefined reference to `Fl_Group::begin()'
fluff.cpp:(.text+0x4a18): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4adf): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4b54): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4bc9): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4c55): undefined reference to `Fl_Input::Fl_Input(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4cf1): undefined reference to `Fl_Input::Fl_Input(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4d97): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4e0f): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
fluff.cpp:(.text+0x4e44): undefined reference to `Fl_Group::end()'
/tmp/ccga4lNt.o: In function `Manage_Associations_Window::update()':
...
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x20): undefined reference to `Fl_Browser::item_next(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x24): undefined reference to `Fl_Browser::item_prev(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x28): undefined reference to `Fl_Browser::item_height(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x2c): undefined reference to `Fl_Browser::item_width(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x30): undefined reference to `Fl_Browser_::item_quick_height(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x34): undefined reference to `Fl_Browser::item_draw(void*, int, int, int, int) const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x38): undefined reference to `Fl_Browser_::full_width() const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x3c): undefined reference to `Fl_Browser::full_height() const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x40): undefined reference to `Fl_Browser::incr_height() const'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x44): undefined reference to `Fl_Browser::item_select(void*, int)'
/tmp/ccga4lNt.o:(.rodata._ZTV17Fl_Select_Browser[_ZTV17Fl_Select_Browser]+0x48): undefined reference to `Fl_Browser::item_selected(void*) const'
/tmp/ccga4lNt.o:(.rodata._ZTI12Fluff_Window[_ZTI12Fluff_Window]+0x8): undefined reference to `typeinfo for Fl_Double_Window'
/tmp/ccga4lNt.o:(.rodata._ZTI23Manage_Filetypes_Window[_ZTI23Manage_Filetypes_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/ccga4lNt.o:(.rodata._ZTI26Manage_Associations_Window[_ZTI26Manage_Associations_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/ccga4lNt.o:(.rodata._ZTI16Open_With_Window[_ZTI16Open_With_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/ccga4lNt.o:(.rodata._ZTI17File_Props_Window[_ZTI17File_Props_Window]+0x8): undefined reference to `typeinfo for Fl_Window'
/tmp/ccga4lNt.o:(.rodata._ZTI10Fl_DND_Box[_ZTI10Fl_DND_Box]+0x8): undefined reference to `typeinfo for Fl_Box'
/tmp/ccga4lNt.o:(.rodata._ZTI12Fl_Int_Input[_ZTI12Fl_Int_Input]+0x8): undefined reference to `typeinfo for Fl_Input'
/tmp/ccga4lNt.o:(.rodata._ZTI16Fl_Multi_Browser[_ZTI16Fl_Multi_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
/tmp/ccga4lNt.o:(.rodata._ZTI15Fl_Hold_Browser[_ZTI15Fl_Hold_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
/tmp/ccga4lNt.o:(.rodata._ZTI17Fl_Select_Browser[_ZTI17Fl_Select_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'fluff' failed
make: *** [fluff] Error 1

Don't understand, is this no longer valid C++ code? Will it only work on an older compiler? Should i be installing other libraries? What am i missing?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: fluff fails during make...
« Reply #3 on: July 26, 2015, 07:55:16 PM »
Hi nitram
Quote
A 134K fluff.o executable is, however, created.
That's not an executable, it's an object file. Object files need to be linked to libraries to create executables.

Quote
Both 'gcc fluff.cpp' and 'g++ fluff.cpp' give a pile of errors without success. Here's only a small portion of the g++ output (exceeded max post size):
Code: [Select]
tc@box:/tmp/fluff$ g++ fluff.cpp
/tmp/cct1C3dp.o: In function `wait_cursor()':
fluff.cpp:(.text+0xc5): undefined reference to `fl_cursor(Fl_Cursor, Fl_Color, Fl_Color)'
fluff.cpp:(.text+0xd4): undefined reference to `Fl::check()'
/tmp/cct1C3dp.o: In function `normal_cursor()': ......
Those appear to be fltk errors. You didn't install fltk-1.3, did you? The TC4 version of that info file states:
Quote
                WARNING:
                If you develop fltk 1.1 application,
                *DO NOT* install this extension.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: fluff fails during make...
« Reply #4 on: July 26, 2015, 11:36:28 PM »
sure fluff works, I have it running on tc-6.3   although I use SpaceFM mostly these days

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #5 on: July 27, 2015, 12:01:21 AM »
Hi Rich. Thanks for the reply and tutorial regarding object files and library links - slowly i will understand.

Code: [Select]
tc@box:~$ tce-status -i | grep fltk
fltk-1.1.10
fltk-1.3

:(

Read the fluff info files from older versions earlier today looking for hints, didn't think to read the fltk info files. On my system fltk-1.3.tcz is required by fluxbox, hackedbox and even Xprogs. Will perform a 'base text' type boot and try again. Thanks again for the help.

Hi coreplayer2. The extension fluff.tcz runs fine on my TC 6 system, i just can't make or compile it myself. It's just a practice exercise for myself, want to learn more about compiling, read the code, etc. Thanks.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #6 on: July 27, 2015, 12:39:18 AM »
Completed a 'base norestore' boot. Manually installed the following:
fltk-1.1.10-dev
compiletc

Confirmed fltk-1.3 was not installed.

Unsuccessfully ran 'g++ fluff.cpp' with similar pile of errors as before.

Tried make, using the stock Makefile from the fluff sourcecode and saved  the output:
Code: [Select]
g++ "-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" `fltk-config --cxxflags` -Wall -c fluff.cpp
gcc `fltk-config --use-images --ldflags` -lfltk_images -lm fluff.o -o fluff
Makefile:12: recipe for target 'all' failed

Here's the fluff Makefile:
Code: [Select]
#makefile for fltk program
CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti"
PROG=fluff
PROG_CAPS=FileMgr
DESC="File Manager"
#UNCOMMENT THE FIRST LINE FOR Tiny Core 3.x, THE SECOND for Core 4.x
#TCEDIR=`cat /opt/.tce_dir`
TCEDIR="/etc/sysconfig/tcedir"
BASEDIR=`pwd`

all: ${PROG}.cpp
g++ ${CXXFLAGS} `fltk-config --cxxflags` -Wall -c ${PROG}.cpp
gcc `fltk-config --use-images --ldflags` -lfltk_images -lm ${PROG}.o -o ${PROG}
strip ${PROG}
echo `ls -l fluff`

debug: ${PROG}.cpp
# g++ ${CXXFLAGS} `fltk-config --cxxflags` -g -O0 -c ${PROG}.cpp
g++ ${CXXFLAGS} `fltk-config --cxxflags` -g -c ${PROG}.cpp
gcc `fltk-config --use-images --ldflags` -lfltk_images -lm ${PROG}.o -o ${PROG}

clean:
rm *.o ${PROG}

run:
fluff &

oldpackage: ${PROG}
./build-tcz_for_tc_2_10.sh

package: all
./build-tcz.sh ${PROG} ${PROG_CAPS} ${BASEDIR} ${DESC} "FULL"

upgrade_package:  ${PROG}
./build-tcz.sh ${PROG} ${PROG_CAPS} ${BASEDIR} ${DESC} "UPGRADE"


tarball:
tar -czf ${PROG}_src.tar.gz fluff.cpp fluff_fc.sh fluff.png fluff_help.htm build-tcz.sh fluff.gif test.sh mkdirs.sh Makefile

unpack:
tar -xzf ${PROG}_src.tar.gz


install: package
if grep ${PROG}.tcz ${TCEDIR}/onboot.lst; \
then echo "Already installed. Use \"make update.\""; \
else echo "${PROG}.tcz" >> ${TCEDIR}/onboot.lst; \
sudo cp ${PROG}.tcz ${TCEDIR}/optional; \
tce-load -ic ${PROG}.tcz; \
fi


update: package
if grep ${PROG}.tcz ${TCEDIR}/onboot.lst; \
then sudo cp ${PROG}.tcz ${TCEDIR}/optional; \
sudo cp ${PROG}          /usr/local/bin/; \
sudo cp fluff_fc.sh      /usr/local/bin/; \
sudo cp ${PROG}_help.htm /usr/local/share/doc/fluff/; \
sudo cp ${PROG}.gif      /usr/local/share/doc/fluff/; \
sudo cp ${PROG}.png /usr/local/share/pixmaps; \
else echo "Not installed yet. Use \"make install.\""; \
fi

Anything wrong with line 12 of the Makefile?
Code: [Select]
g++ ${CXXFLAGS} `fltk-config --cxxflags` -Wall -c ${PROG}.cpp

Thanks again for the help, every step is a learning experience.


Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #7 on: July 27, 2015, 01:17:08 AM »
Arrggh! Forgot to change gcc to g++ in the Makefile. Rebooted via 'base norestore' and tried again.

Successfully created a nice little fluff executable in my /tmp/fluff folder  :)

Rebooted into fluxbox and tested the new fluff binary, runs well. Thanks Rich and coreplayer2 for the input. Learned a bit more:
- C vs C++
- how Makefiles work
- always check info files, even for -dev dependencies
- Rich - you the man!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: fluff fails during make...
« Reply #8 on: July 27, 2015, 01:23:07 AM »
Hi nitram
You beat me to it. I was just going to suggest changing gcc to g++.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #9 on: July 27, 2015, 01:59:20 AM »
Curious - still don't understand why 'g++ fluff.cpp' failed during my last successful 'base norestore'  and 'make' boot? Does the design of Tiny Core require some other parameters with the g++ command? Obviously fluff.cpp is valid C++ code and compiletc loads g++. Thought i would just get a nice little a.out binary. Just trying to further understand. Feedback appreciated, otherwise will keep researching. Thanks.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: fluff fails during make...
« Reply #10 on: July 27, 2015, 02:20:38 AM »
Hi nitram
Quote
Curious - still don't understand why 'g++ fluff.cpp' failed during my last successful 'base norestore'  and 'make' boot?
Line 12 of the Makefile does the compilation which produces and object file. That part worked.
Line 13 links the object file to the libraries it depends on. That part failed:
Code: [Select]
/tmp/ccga4lNt.o:(.rodata._ZTI17Fl_Select_Browser[_ZTI17Fl_Select_Browser]+0x8): undefined reference to `typeinfo for Fl_Browser'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'fluff' failed
make: *** [fluff] Error 1
The error was returned by the linker (error: ld).

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: fluff fails during make...
« Reply #11 on: July 27, 2015, 02:40:12 AM »
but wanted more practice so decided to compile something already in the repository
You could have chosen sed instead  ;)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: fluff fails during make...
« Reply #12 on: July 27, 2015, 04:29:15 AM »
Thanks for the explanation Rich. Did an umpteenth base boot and realized the answer to my question was already in plain sight within the make recipe.

Juanito i don't even know what sed is :)
...also wanted to try something with dependencies and want to try my hand at tweaking Fluff.

If anyone needs a compiling project completed, remember...i'm not your man!

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: fluff fails during make...
« Reply #13 on: July 27, 2015, 04:57:05 AM »
Actually, getting things done is often a matter of learning where to look for a solution. If you feel like a fool now, you know  you've learned something. You're not getting away from becoming the man.
Download a copy and keep it handy: Core book ;)