GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 19-Jul-2008, 07:46
floogy floogy is offline
New Member
 
Join Date: Jul 2008
Posts: 3
floogy is on a distinguished road

Compile errors on FLU


Hi,

I wanted to compile FLU on ubuntu hardy amd64, but I get this error:
Code:
007@ubuntu:~/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14$ ./configure FLU configure script v1.3 Checking whether gcc accepts -fPIC...yes Checking for required libs... FL/Fl.H GL/gl.h GL/glu.h libfltk libfltk_gl libGL libGLU Creating makeinclude... Creating Makefile... Creating flu-config... done 007@ubuntu:~/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14$ make === making src === make[1]: Entering directory `/home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/src' Compiling Flu_Button.o... Compiling Flu_Chat_Buffer.o... Compiling Flu_Choice_Group.o... Compiling Flu_Collapsable_Group.o... Compiling Flu_Combo_Box.o... Compiling Flu_Combo_List.o... Compiling Flu_Combo_Tree.o... In file included from /home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/FLU/Flu_Combo_Tree.h:20, from Flu_Combo_Tree.cpp:23: /home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/FLU/Flu_Tree_Browser.h:349: error: extra qualification ‘Flu_Tree_Browser::’ on member ‘inside_entry_area’ /home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/FLU/Flu_Tree_Browser.h: In member function ‘unsigned int Flu_Tree_Browser::Node::remove(const char*)’: /home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/FLU/Flu_Tree_Browser.h:1081: error: cast from ‘Flu_Tree_Browser::Node*’ to ‘unsigned int’ loses precision make[1]: *** [Flu_Combo_Tree.o] Error 1 make[1]: Leaving directory `/home/007/Desktop/Stuff/CMS/prog/oyranos/FLU_2.14/src'

I need it for icc-Examin and oyranos
  #2  
Old 26-Jul-2008, 05:36
_Sensible _Sensible is offline
New Member
 
Join Date: Jul 2008
Posts: 10
_Sensible is on a distinguished road

Re: Compile errors on FLU


I have the same issue. Any fix for this on 64bit OS?
  #3  
Old 26-Jul-2008, 07:45
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,309
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Compile errors on FLU


Quote:
Originally Posted by floogy
/FLU/Flu_Tree_Browser.h:349: error: extra qualification ‘Flu_Tree_Browser::’ on member ‘inside_entry_area’

Open Flu_Tree_Browser.h in your text editor.

Here's line 349:
CPP / C++ / C Code:
  bool Flu_Tree_Browser :: inside_entry_area( int x, int y );

Comment it out and add a line as follows:
CPP / C++ / C Code:
  //bool Flu_Tree_Browser :: inside_entry_area( int x, int y ); //Original
  bool inside_entry_area( int x, int y ); //Fixed for modern g++

g++ version 4 doesn't like the superfluous ‘Flu_Tree_Browser::' since it's inside the class definition.

Regards,

Dave
  #4  
Old 27-Jul-2008, 09:06
_Sensible _Sensible is offline
New Member
 
Join Date: Jul 2008
Posts: 10
_Sensible is on a distinguished road

Re: Compile errors on FLU


Thanks, but I get these errors

Code:
=== making src === make[1]: Entering directory `/home/gr/.local/share/Trash/files/FLU_2.2.14/src' Compiling Flu_Button.o... Compiling Flu_Chat_Buffer.o... Compiling Flu_Choice_Group.o... Compiling Flu_Collapsable_Group.o... Compiling Flu_Combo_Box.o... Compiling Flu_Combo_List.o... Compiling Flu_Combo_Tree.o... In file included from /home/gr/Desktop/FLU_2.14/FLU/Flu_Combo_Tree.h:20, from Flu_Combo_Tree.cpp:23: /home/gr/Desktop/FLU_2.14/FLU/Flu_Tree_Browser.h: In member function ‘unsigned int Flu_Tree_Browser::Node::remove(const char*)’: /home/gr/Desktop/FLU_2.14/FLU/Flu_Tree_Browser.h:1082: error: cast from ‘Flu_Tree_Browser::Node*’ to ‘unsigned int’ loses precision make[1]: *** [Flu_Combo_Tree.o] Error 1 make[1]: Leaving directory `/home/gr/.local/share/Trash/files/FLU_2.2.14/src'
  #5  
Old 27-Jul-2008, 11:12
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,309
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Compile errors on FLU


Quote:
Originally Posted by _Sensible
Thanks, but I get these errors

Here's the code:
CPP / C++ / C Code:
      inline unsigned int remove( const char *fullpath )
	{ return( (unsigned int)modify( fullpath, REMOVE, tree->rdata ) ); }
The function modify returns a pointer to a Node. The function remove returns an unsigned int.

Here's the problem: The person who wrote the code has assumed that pointers are the same size as ints.

Proper program design never (that's never) assumes stuff like "size of a pointer is the same as the size of whatever...," since C and C++ language standards specifically state that sizes of integer data types are allowed to vary from one implementation (compiler) to another. The result is that there is no guaranteed relationship between the size of any particular integer data type and pointer size for that compiler.

Specifically, for GNU compilers for 64-bit systems, a pointer is 64-bits and an unsigned int is 32-bits. Therefore it won't compute.

Note that For GNU compilers for 32 bit systems (and just about all current 32-bit compilers), pointers are 32-bits and unsigned ints are 32-bits. therefore this is (apparently) not a problem for those.

This is one of the reasons that I stopped installing 64-bit Linux on any of my working systems. There is a ton of legacy code out there that does stuff like this. (This may be getting better as some of the authors/maintainers wise up in the light of current developments.)


Maybe some other reader of this forum has found some modifications that will work. There are other fltk forums; maybe there is a solution on one of those.

You could complain (politely, of course, since the software is free) to the author and/or maintainer of the code. I think there very well may be "simple" ways to "fix" it, but I have no way to test anything like this, and no desire to waste your time.

Or you could install the 32-bit version of your operating system if this is a possibility.

Regards,

Dave
  #6  
Old 27-Jul-2008, 15:47
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,309
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Compile errors on FLU


Quote:
Originally Posted by davekw7x
...I stopped installing 64-bit Linux on any of my working systems

Well, I fired up my 64-bit Centos 5.2 testbed/sandbox and discovered a way to get the FLU stuff to compile.

Here's the readme from the attached zip file:

Code:
---begin readme.davekw7x--- FLU_2.14: ----***NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***---- I have made some changes to get the package to compile with current versions of GNU g++ on Linux platforms. The only testing that I have done is with the programs in the FLU_2.14/examples directory. I don't use FLU and will do no more testing. I hope you find this helpful. ----***NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***---- If this doesn't work on your platform, well, I doubt that I can help. Here's what I did: In order to compile with version 4.x.x g++ 64-bit compilers I made changes in files Flu_File_Chooser.cpp, Flu_Tree_Browser.cpp and Flu_Tree_Browser.h I have supplied "fixed" files here. Assuming that you have successfully performed the configuration of FLU, here's the drill: Copy flustuff.zip to the directory above FLU_2.14. Execute the following from the command line: unzip flustuff.zip Still in the directory above FLU_2.14, execute the following: cp -v Flu_File_Chooser_fixed.cpp FLU_2.14/src/Flu_File_Chooser.cpp cp -v Flu_Tree_Browser_fixed.cpp FLU_2.14/src/Flu_Tree_Browser.cpp cp -v Flu_Tree_Browser_fixed.h FLU_2.14/FLU/Flu_Tree_Browser.h Then cd FLU_2.14 make clean make (I got nine warnings about deprecated fltk_ask function but no other warnings and no errors.) %%%%% If all goes well, then %%% Execute the following as root: make install Then, as your usual, non-root self: cd examples make The example applications Flu_Button_Try, Flu_Chat_Buffer_Try, etc., should be built at this point, ready for testing. Regards, davekw7x July 27, 2008 Foonote: I have performed the above steps on my Centos 5 Linux platform running 64-bit GNU g++ version 4.1.2. I haven't done any testing other than the example programs. They seem to work as expected, but I don't do FLU development, so I'm not really sure about things. I also verified that the changes work with 32-bit g++ on my 32-bit Linux platforms with g++ 4.1.2. The only one really required to allow it to compile with 32-bit compilers is the change to line 349 in Flu_Tree_Browser.h. The other changes aren't necessary, but they apparently do no harm on the 32-bit version. ---end readme.davekw7x

I would like to emphasize that I haven't done much testing, and don't intend to do more, so if it doesn't help, then perhaps the best bet would be to contact the author.

Actually, in my opinion, the best bet would be to use a 32-bit Linux distribution rather than a 64-bit one, but that may not be something you can do.

Regards,

Dave
Attached Files
File Type: zip flustuff.zip (57.2 KB, 54 views)
  #7  
Old 27-Jul-2008, 16:56
floogy floogy is offline
New Member
 
Join Date: Jul 2008
Posts: 3
floogy is on a distinguished road

Re: Compile errors on FLU


Thank you very much davekw7x! I'll have a look into it when I got some more time. I compiled oyranos without flu, because the developer of oyranos (Kai-Uwe Behrmann) replaced the references to FLU in his project with some other file management.

When I got success I'll try to inform the author of FLU, to make his package more x64 compatible.

I have to admit, that it's a sad old news, that one should better avoid linux 64bit operating system nowadays, because of a bunch of applications that are not yet enabled to be used on these platforms. And you're right: I made that mistake 2 or three years ago, but I don't want to change my sytem yet.
  #8  
Old 27-Jul-2008, 18:08
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,309
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Compile errors on FLU


Quote:
Originally Posted by floogy
...news, that one should better avoid linux 64bit operating system ...

Well, I'm not sure that it's a "mistake." Let's just call it a "learning opportunity." The reason that I hang around gidforums is that I always learn something here---always.

The reason that I go through things like this when I don't have to is that I'm guessing that some day I might run across (or create) an application that can actually require--or at least take advantage of--- 64-bit systems. (It hasn't happened yet for me personally, but it could happen, I'm thinking.)

Regards,

Dave
  #9  
Old 29-Jul-2008, 14:23
_Sensible _Sensible is offline
New Member
 
Join Date: Jul 2008
Posts: 10
_Sensible is on a distinguished road

Re: Compile errors on FLU


@davekw7x

Possible to upload the fix? I am unable to download the attachment
  #10  
Old 29-Jul-2008, 15:51
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,309
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Compile errors on FLU


Quote:
Originally Posted by _Sensible
... I am unable to download the attachment
What's wrong with the attachment?

Regards,

Dave
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need urgent help. Nonsensical compile errors on test code (for game) seasons C++ Forum 1 29-Nov-2007 12:41
Compile Errors jdbrine C++ Forum 3 30-Jun-2006 11:11
Help needed in fixing compile errors. daisy_polly C++ Forum 3 25-Jun-2006 17:47
Compile Errors due to Default Parameters jdbrine C++ Forum 1 17-Jun-2006 14:45
Compile errors earachefl C++ Forum 3 24-Feb-2006 16:49

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:48.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.