[one-users] Compilation problem
Upendra Sharma
upendras at hotmail.com
Thu Feb 26 18:26:56 PST 2009
Thanks Ruben,
lex's version-convention is weird ...
anyways, as per your advice, I have installed the correct version: $ lex -Vlex 2.5.35
after this it was not happy about something else. I am pasting the relevant commands/output:
############### edited console output #############$ scons -c$ scons parsers=yes...build_lex(["src/host/host_parser.c", "src/host/host_parser.h"], ["src/host/host_parser.l"])g++ -o src/host/Host.o -c -g -Wall -Iinclude src/host/Host.ccsrc/host/Host.cc:323: error: declaration of C function 'void host_lex_destroy()' conflicts withhost_parser.h:228: error: previous declaration 'int host_lex_destroy()' herescons: *** [src/host/Host.o] Error 1scons: building terminated because of errors.############################################
I made a trivial change in src/host/Host.cc, after which it compiles smoothly.
$ diff src/host/Host.cc ../old_one-1.2.0/src/host/Host.cc323c323< int host_lex_destroy();---> void host_lex_destroy();
thanks again,-upendra
> Date: Fri, 27 Feb 2009 00:33:29 +0100
> From: rubensm at dacya.ucm.es
> To: users at lists.opennebula.org
> Subject: Re: [one-users] Compilation problem
>
> Hi,
> Yes, it is quite strange... From the flex page (http://flex.sourceforge.net/) it seems that 2.5.4 (1997) is not the latest release (2.5.35) so you should update flex.
>
> Regarding the parser itself, we chose a syntax closer to the user, so writing a VM description file was easy. So the files in OpenNebula (configuration and "user" files) uses a syntax easy to write. We feel that XML is not as clear and more cumbersome most of the time -from the human point of view ;) -. However, we are now supporting XML to communicate the files to other components. Also XML will be used to ease the integration of OpenNebula with other software tools (for example
> http://trac.opennebula.org/ticket/85)
>
> Thanks for your comments!
>
> Cheers!
>
> Ruben
>
>
>
>
> On Wednesday 25 February 2009 23:48:11 Upendra Sharma wrote:
>>
>> Thanks Ruben,
>> I tried and it doesnt compile ...
>> my results ..
>> $> flex -Vflex version 2.5.4$> flex host_parser.l "host_parser.l", line 37: unrecognized %option: header-file
>>
>> thats odd ... have they removed header-file option in the newer version ???
>> Frankly, I was trying to add an extra "SimpleOption" in the configuration file so, simply out of precaution, I switched on the flag "parsers=yes". Later, I checked that the lex file is general enough to work for me without any change. So, currently, I have managed to get it working ... but wanted to check with you folks if there is something wrong in my setup ... and it seems there is something wrong :).
>> Please do let me know if there is a fix for this problem.
>> thanks,-upendra
>> PS:On a completely different note: a not-so-important concern: I was wondering why the nebula folks chose to write their own parser, and why not use the standard XML parser? Given that storing configuration info in XMLs is not unpopular (I guess its widely followed).
>>
>>
>>> Date: Wed, 25 Feb 2009 18:38:19 +0100
>>> From: rubensm at dacya.ucm.es
>>> Subject: Re: [one-users] Compilation problem
>>> To: users at lists.opennebula.org
>>> CC: upendras at hotmail.com
>>>
>>> Hi,
>>> Here its working with
>>> $ flex -V
>>> flex 2.5.35
>>> $ bison --version
>>> bison (GNU Bison) 2.3
>>>
>>> So I suggest you to execute flex directly and see if it works:
>>>
>>> $ cd one-1.2.0/src/host
>>> $ flex host_parser.l
>>>
>>> Cheers
>>>
>>> Ruben
>>>
>>>
>>> On Wednesday 25 February 2009 05:41:00 Upendra Sharma wrote:
>>>>
>>>> Hi folks,
>>>> I tried to compile one-1.2.0 and it threw an error while compiling the lex file.I ran the following command
>>>> scons parsers=yes...build_lex(["src/host/host_parser.c", "src/host/host_parser.h"], ["src/host/host_parser.l"])"host_parser.l", line 37: unrecognized %option: header-file
>>>> I checked the host_parser.l is the same file (using diff).
>>>> my flex and bison versions are ..lex --versionlex version 2.5.4
>>>> bison --versionbison (GNU Bison) 2.3
>>>>
>>>> of course, I checked ... when I run scons without parsers=yes .. it sails smoothly. Can someone tell me where am I doing it wrong?
>>>>
>>>> thanks,-upendra
>>>>
>>>> _________________________________________________________________
>>>> Chose your Life Partner! Join MSN Matrimony FREE
>>>> http://www.in.msn.com/matrimony
>>>
>>> --
>>> +---------------------------------------------------------------+
>>> Dr. Ruben Santiago Montero
>>> Associate Professor
>>> Distributed System Architecture Group (http://dsa-research.org)
>>>
>>> URL: http://dsa-research.org/doku.php?id=people:ruben
>>> Weblog: http://blog.dsa-research.org/?author=7
>>>
>>> GridWay, http://www.gridway.org
>>> OpenNEbula, http://www.opennebula.org
>>> +---------------------------------------------------------------+
>>
>> _________________________________________________________________
>> Chose your Life Partner! Join MSN Matrimony FREE
>> http://www.in.msn.com/matrimony
>
> --
> +---------------------------------------------------------------+
> Dr. Ruben Santiago Montero
> Associate Professor
> Distributed System Architecture Group (http://dsa-research.org)
>
> URL: http://dsa-research.org/doku.php?id=people:ruben
> Weblog: http://blog.dsa-research.org/?author=7
>
> GridWay, http://www.gridway.org
> OpenNEbula, http://www.opennebula.org
> +---------------------------------------------------------------+
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
_________________________________________________________________
Plug in to the MSN Tech channel for a full update on the latest gizmos that made an impact.
http://computing.in.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20090227/de5d1d5c/attachment-0003.htm>
More information about the Users
mailing list