Should Flex be added to the prequisites in configure

A place for people to post strange occurances that could be potential bugs.

Moderator: Board moderators

Post Reply
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Should Flex be added to the prequisites in configure

Post by SilverNexus »

I was compiling the trunk crossfire server for my new computer (running Linux Mint 15), and encountered an odd occurrence:

I passed the prerequisite tests in place in the configure script

Code: Select all

configure: Configuration summary....
configure: 
configure:   Paths
configure:     prefix default value                 /usr/games/crossfire
configure:     exec_prefix default value            ${prefix}
configure:     Will put executables in              ${exec_prefix}/bin
configure:     Will put resources in                ${datarootdir}
configure:     Will put config in                   ${prefix}/etc
configure:     Will put server runtime datas in:    ${prefix}/var
configure: 
configure:   Build options
configure: 
configure:     Will build metaserver2 support?      yes
configure:     Will build plugins?                  yes
configure:     Will build python plugin?            yes
configure:     Will build random house plugin?      yes
configure:     Will process unit testing?           no
configure:       If you are a developer, you MUST install the check framework
configure:       and write automated tests for all your add-ons!
configure: 
configure:   Build utilities (Not required to build or run the server)
configure: 
configure:     Will build crossfire-mapper?         no
But, when I proceeded to compile, I got this error message:

Code: Select all

/home/dan/crossfire-server/utils/missing: line 52: flex: command not found
WARNING: `flex' is missing on your system.  You should only need it if
         you modified a `.l' file.  You may need the `Flex' package
         in order for those modifications to take effect.  You can get
         `Flex' from any GNU archive site.
Could this have something to do with the fact I enabled the Random House Plugin, and could it be a prerequisite that needs to be added to the configure script?

To ensure my computer is not being insane, I was going to install flex and try again.

*Tries to install Flex, first attempting the newest Flex, then proceeding to the 2.5.4a branch after the first fails to solve the problem*

Well, the flex warning went away, but it still errors out on me.

*Reruns the configure script*

Okay, now it works, but it looks like flex is a prerequisite somewhere in here, and should be added to the configure script (I would do it myself, but I have no clue how to properly write a configure script, let alone edit one)

I do not know, though, if it works without the random house plugin disabled, or with other optional plugins enabled.Should I check this functionality as well, or is this enough of a bug report?
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
mwedel
Regular
Posts: 86
Joined: Tue Jul 17, 2007 5:23 am
Location: Santa Clara, CA, USA

Post by mwedel »

This is a tricky issue.

The reason is that the tools needed to compile SVN repositories is different than the tools needed to compile the official releases. In the official releases, archetypes are generated, the .c files from flex are already generated, Makefiles, configure file, etc.

So in that case, erroring out if flex, perl, automake, etc, are missing probably isn't right.

But you are also correct in that for the SVN repository, flex is needed.

One possible solution would be to have a bunch of conditionals in the configure file - something that notes it is an official release, and therefor do not check for all those extra programs.

But I'm not sure if just always checking for flex in configure is the right fix here.
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

A quick fix would be for the configure script to raise a warning if flex is not installed, but not error out the whole script. With the warning would be a message explaining that flex is only necessary for repository builds, not official releases (It may have to go near the configuration summary, just so it should be seen).

However the thorough fix would be they way you described.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Post Reply