Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » IMP » LPG in linux
LPG in linux [message #16493] Wed, 13 February 2008 15:17 Go to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

I have some questions for you...

I'm working with LPG to generate a parser from some grammar files...At
this moment I'm not using IMP project since I'm working with Ganymede's
milestones and I just want to use the Parser Generator. Generating the
IDE can be set off...

The problem is that I was working with WinXP OS, and I used the lpg.exe
program to generate the lexer, parser, etc... I have moved to a Linux -
Environment and I have tried to recompile the source code with no success...
- cl compiler used by the Makefile seems to be a Windows programme.
- I tried it with g++ linux-programme with no success.

Isn't LPG thought to work in a Linux Env ?
Could you give some clue to tackle this problem?

Greetings,
Adolfo.
Re: LPG in linux [message #16529 is a reply to message #16493] Sat, 16 February 2008 15:36 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Adolfo Sánchez-Barbudo Herrera wrote:
> Hi Robert,
>
> I have some questions for you...
>
> I'm working with LPG to generate a parser from some grammar files...At
> this moment I'm not using IMP project since I'm working with Ganymede's
> milestones and I just want to use the Parser Generator. Generating the
> IDE can be set off...
>
> The problem is that I was working with WinXP OS, and I used the lpg.exe
> program to generate the lexer, parser, etc... I have moved to a Linux -
> Environment and I have tried to recompile the source code with no
> success...
> - cl compiler used by the Makefile seems to be a Windows programme.
> - I tried it with g++ linux-programme with no success.
>
> Isn't LPG thought to work in a Linux Env ?
> Could you give some clue to tackle this problem?

LPG *should* build fine out of the box with any recent version of g++,
however, we haven't had the time to get a g++-based build to work on
Windows. [In theory we should be able to use mingw and link statically,
but no one has yet done that.] "cl" indeed refers to the Microsoft C++
compiler.

If you're having trouble compiling LPG with g++, please post details
about the errors you're seeing, so we can help diagnose the problems.

BTW, we've recently migrated to using plugin fragments to house the
platform-specific binaries. The fragments have names like:

lpg.generator.win32_x86 and
lpg.generator.linux_x86

The update manager should automagically pick up the right fragment
given the platform on which you're running Eclipse. This has worked
for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
but then I'm installing on the same kind of machines on which I built
the binaries, and I don't have any other Linux platforms to test on.

There's a problem with this mechanism, though: it appears to me that
the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
"ws" variables) doesn't provide enough information to distinguish
Linux boxes running, say, different versions of gcc/libc. As a result,
a plugin fragment may seem to Eclipse to be appropriate for running on
a given kind of host, when in reality it isn't. I'm not sure how to
address this problem at this point. Any help here would be greatly
appreciated!

Of course we wouldn't have this problem if LPG were a Java program,
but we don't have the bandwidth to rewrite it in Java. [Any takers
there?]

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Team Lead (http://eclipse-imp.sourceforge.net)
X10: Productivity for High-Performance Parallel Programming (http://x10.sf.net)
Re: LPG in linux [message #16546 is a reply to message #16529] Sun, 17 February 2008 12:05 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

Comments in-line below:

Robert M. Fuhrer escribió:
> Adolfo Sánchez-Barbudo Herrera wrote:
>> Hi Robert,
>>
>> I have some questions for you...
>>
>> I'm working with LPG to generate a parser from some grammar files...At
>> this moment I'm not using IMP project since I'm working with
>> Ganymede's milestones and I just want to use the Parser Generator.
>> Generating the IDE can be set off...
>>
>> The problem is that I was working with WinXP OS, and I used the
>> lpg.exe program to generate the lexer, parser, etc... I have moved to
>> a Linux - Environment and I have tried to recompile the source code
>> with no success...
>> - cl compiler used by the Makefile seems to be a Windows programme.
>> - I tried it with g++ linux-programme with no success.
>>
>> Isn't LPG thought to work in a Linux Env ?
>> Could you give some clue to tackle this problem?
>
> LPG *should* build fine out of the box with any recent version of g++,
> however, we haven't had the time to get a g++-based build to work on
> Windows. "cl" indeed refers to the Microsoft C++
> compiler.
>
> If you're having trouble compiling LPG with g++, please post details
> about the errors you're seeing, so we can help diagnose the problems.

I'm using lpgdistribution from sourceforge. And I try to built the
sourcecode included...

What i have changed in order to run the makefile:
GCPPC=g++ -O -DNDEBUG
#GCPPC=cl -O -DNDEBUG -EHsc

The g++ compiler doesn't understand all that options (Only -E one). I
don't know what are its intention in cl compiler.

The output (translated):
g++ -O -DNDEBUG -c jikespg.cpp
g++ -O -DNDEBUG -c symbol.cpp
g++ -O -DNDEBUG -c code.cpp
g++ -O -DNDEBUG -c util.cpp
util.cpp: In function ‘int SystemMkdir(char*)’:
util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
make: *** [util.obj] Error 1

Besides:
It seems to be a rule related to generic.cpp file, when it doesn't
exists in the sourcecode folder.

I hope, this info suffice...
>
> BTW, we've recently migrated to using plugin fragments to house the
> platform-specific binaries. The fragments have names like:
>
> lpg.generator.win32_x86 and
> lpg.generator.linux_x86
>

Well, i'll try this...
> The update manager should automagically pick up the right fragment
> given the platform on which you're running Eclipse. This has worked
> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
> but then I'm installing on the same kind of machines on which I built
> the binaries, and I don't have any other Linux platforms to test on.
>

I didn't know about imp installation through the update manager...
What update site uses ?¿?
Any official Eclipse site ?

I'll try it...

> There's a problem with this mechanism, though: it appears to me that
> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
> "ws" variables) doesn't provide enough information to distinguish
> Linux boxes running, say, different versions of gcc/libc. As a result,
> a plugin fragment may seem to Eclipse to be appropriate for running on
> a given kind of host, when in reality it isn't. I'm not sure how to
> address this problem at this point. Any help here would be greatly
> appreciated!

Well, i have no knowledge or experience about this. If I have any idea
or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
> Of course we wouldn't have this problem if LPG were a Java program,
> but we don't have the bandwidth to rewrite it in Java. [Any takers
> there?
>

Cheers,
Adolfo.
Re: LPG in linux [message #16563 is a reply to message #16546] Mon, 18 February 2008 17:26 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

I have tried binary program from:

lpg.generator.linux_x86 project.

It worked, but unfortunately the parser generated is not the expected
one. It seems that my grammars are "deprecated", for example look at
this error:
.... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
escaped symbol "$Globals" as a keyword has been deprecated. The proper
spelling is %Globals

Upgrading my grammars is not an option, since I'm extending Eclipse
MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
"deprecated" too...

So i still need to build a binary program from lpg v1.1 soure code
(lpgdistribution package) which works in Linux Environments...And i
don't find the way out to do it :(

Do you have anymore ideas?...

Best Regards,
Adolfo.


Adolfo Sánchez-Barbudo Herrera escribió:
> Hi Robert,
>
> Comments in-line below:
>
> Robert M. Fuhrer escribió:
>> Adolfo Sánchez-Barbudo Herrera wrote:
>>> Hi Robert,
>>>
>>> I have some questions for you...
>>>
>>> I'm working with LPG to generate a parser from some grammar
>>> files...At this moment I'm not using IMP project since I'm working
>>> with Ganymede's milestones and I just want to use the Parser
>>> Generator. Generating the IDE can be set off...
>>>
>>> The problem is that I was working with WinXP OS, and I used the
>>> lpg.exe program to generate the lexer, parser, etc... I have moved to
>>> a Linux - Environment and I have tried to recompile the source code
>>> with no success...
>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>> - I tried it with g++ linux-programme with no success.
>>>
>>> Isn't LPG thought to work in a Linux Env ?
>>> Could you give some clue to tackle this problem?
>>
>> LPG *should* build fine out of the box with any recent version of g++,
>> however, we haven't had the time to get a g++-based build to work on
>> Windows. "cl" indeed refers to the Microsoft C++
>> compiler.
>>
>> If you're having trouble compiling LPG with g++, please post details
>> about the errors you're seeing, so we can help diagnose the problems.
>
> I'm using lpgdistribution from sourceforge. And I try to built the
> sourcecode included...
>
> What i have changed in order to run the makefile:
> GCPPC=g++ -O -DNDEBUG
> #GCPPC=cl -O -DNDEBUG -EHsc
>
> The g++ compiler doesn't understand all that options (Only -E one). I
> don't know what are its intention in cl compiler.
>
> The output (translated):
> g++ -O -DNDEBUG -c jikespg.cpp
> g++ -O -DNDEBUG -c symbol.cpp
> g++ -O -DNDEBUG -c code.cpp
> g++ -O -DNDEBUG -c util.cpp
> util.cpp: In function ‘int SystemMkdir(char*)’:
> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
> make: *** [util.obj] Error 1
>
> Besides:
> It seems to be a rule related to generic.cpp file, when it doesn't
> exists in the sourcecode folder.
>
> I hope, this info suffice...
>>
>> BTW, we've recently migrated to using plugin fragments to house the
>> platform-specific binaries. The fragments have names like:
>>
>> lpg.generator.win32_x86 and
>> lpg.generator.linux_x86
>>
>
> Well, i'll try this...
>> The update manager should automagically pick up the right fragment
>> given the platform on which you're running Eclipse. This has worked
>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>> but then I'm installing on the same kind of machines on which I built
>> the binaries, and I don't have any other Linux platforms to test on.
>>
>
> I didn't know about imp installation through the update manager...
> What update site uses ?¿?
> Any official Eclipse site ?
>
> I'll try it...
>
>> There's a problem with this mechanism, though: it appears to me that
>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>> "ws" variables) doesn't provide enough information to distinguish
>> Linux boxes running, say, different versions of gcc/libc. As a result,
>> a plugin fragment may seem to Eclipse to be appropriate for running on
>> a given kind of host, when in reality it isn't. I'm not sure how to
>> address this problem at this point. Any help here would be greatly
>> appreciated!
>
> Well, i have no knowledge or experience about this. If I have any idea
> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>> Of course we wouldn't have this problem if LPG were a Java program,
>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>> there?
>>
>
> Cheers,
> Adolfo.
Re: LPG in linux [message #16635 is a reply to message #16563] Wed, 20 February 2008 20:56 Go to previous messageGo to next message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Adolfo Sánchez-Barbudo Herrera wrote:
> Hi Robert,
>
> I have tried binary program from:
>
> lpg.generator.linux_x86 project.
>
> It worked, but unfortunately the parser generated is not the expected
> one. It seems that my grammars are "deprecated", for example look at
> this error:
> ... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
> escaped symbol "$Globals" as a keyword has been deprecated. The proper
> spelling is %Globals

Note that this is just a warning, not an error. It's telling you that the
new spelling of the directive starts with '%' rather than '$'. [We've done
this so that the space of macro names (which the programmer controls) is
clearly distinct from that of directives (which are hard-wired). At some
point, we may remove support for the old syntax.

The upshot is that your grammar is still perfectly legal, and the generated
parser should work as you expect. I don't think you should need to use the
1.1 binary, but please let us know if the new version doesn't work for you
(and post details on what you tried and what the result was).

> Upgrading my grammars is not an option, since I'm extending Eclipse
> MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
> "deprecated" too...
>
> So i still need to build a binary program from lpg v1.1 soure code
> (lpgdistribution package) which works in Linux Environments...And i
> don't find the way out to do it :(
>
> Do you have anymore ideas?...
>
> Best Regards,
> Adolfo.
>
>
> Adolfo Sánchez-Barbudo Herrera escribió:
>> Hi Robert,
>>
>> Comments in-line below:
>>
>> Robert M. Fuhrer escribió:
>>> Adolfo Sánchez-Barbudo Herrera wrote:
>>>> Hi Robert,
>>>>
>>>> I have some questions for you...
>>>>
>>>> I'm working with LPG to generate a parser from some grammar
>>>> files...At this moment I'm not using IMP project since I'm working
>>>> with Ganymede's milestones and I just want to use the Parser
>>>> Generator. Generating the IDE can be set off...
>>>>
>>>> The problem is that I was working with WinXP OS, and I used the
>>>> lpg.exe program to generate the lexer, parser, etc... I have moved
>>>> to a Linux - Environment and I have tried to recompile the source
>>>> code with no success...
>>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>>> - I tried it with g++ linux-programme with no success.
>>>>
>>>> Isn't LPG thought to work in a Linux Env ?
>>>> Could you give some clue to tackle this problem?
>>>
>>> LPG *should* build fine out of the box with any recent version of g++,
>>> however, we haven't had the time to get a g++-based build to work on
>>> Windows. "cl" indeed refers to the Microsoft C++
>>> compiler.
>>>
>>> If you're having trouble compiling LPG with g++, please post details
>>> about the errors you're seeing, so we can help diagnose the problems.
>>
>> I'm using lpgdistribution from sourceforge. And I try to built the
>> sourcecode included...
>>
>> What i have changed in order to run the makefile:
>> GCPPC=g++ -O -DNDEBUG
>> #GCPPC=cl -O -DNDEBUG -EHsc
>>
>> The g++ compiler doesn't understand all that options (Only -E one). I
>> don't know what are its intention in cl compiler.
>>
>> The output (translated):
>> g++ -O -DNDEBUG -c jikespg.cpp
>> g++ -O -DNDEBUG -c symbol.cpp
>> g++ -O -DNDEBUG -c code.cpp
>> g++ -O -DNDEBUG -c util.cpp
>> util.cpp: In function ‘int SystemMkdir(char*)’:
>> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
>> make: *** [util.obj] Error 1
>>
>> Besides:
>> It seems to be a rule related to generic.cpp file, when it doesn't
>> exists in the sourcecode folder.
>>
>> I hope, this info suffice...
>>>
>>> BTW, we've recently migrated to using plugin fragments to house the
>>> platform-specific binaries. The fragments have names like:
>>>
>>> lpg.generator.win32_x86 and
>>> lpg.generator.linux_x86
>>>
>>
>> Well, i'll try this...
>>> The update manager should automagically pick up the right fragment
>>> given the platform on which you're running Eclipse. This has worked
>>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>>> but then I'm installing on the same kind of machines on which I built
>>> the binaries, and I don't have any other Linux platforms to test on.
>>>
>>
>> I didn't know about imp installation through the update manager...
>> What update site uses ?¿?
>> Any official Eclipse site ?
>>
>> I'll try it...
>>
>>> There's a problem with this mechanism, though: it appears to me that
>>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>>> "ws" variables) doesn't provide enough information to distinguish
>>> Linux boxes running, say, different versions of gcc/libc. As a result,
>>> a plugin fragment may seem to Eclipse to be appropriate for running on
>>> a given kind of host, when in reality it isn't. I'm not sure how to
>>> address this problem at this point. Any help here would be greatly
>>> appreciated!
>>
>> Well, i have no knowledge or experience about this. If I have any idea
>> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>>> Of course we wouldn't have this problem if LPG were a Java program,
>>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>>> there?
>>>
>>
>> Cheers,
>> Adolfo.


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Team Lead (http://eclipse-imp.sourceforge.net)
X10: Productivity for High-Performance Parallel Programming (http://x10.sf.net)
Re: LPG in linux [message #18136 is a reply to message #16635] Wed, 27 February 2008 10:38 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

I'm sorry for the delay.

It didn't work, the generated parser had a lot of errors, a lot of cases
of the switch broken etc. So the grammar which works well with v1.1
binary doesn't work with the linux binary v2.

I finally solved the problem using the v1.1 executable (for windows)
with the linux wine program (which lets me execute windows programs).

I know that is not a smart solution, but it suffices me ;), and maybe
someone.

Best Regards,
Adolfo.

Robert M. Fuhrer escribió:
> Adolfo Sánchez-Barbudo Herrera wrote:
>> Hi Robert,
>>
>> I have tried binary program from:
>>
>> lpg.generator.linux_x86 project.
>>
>> It worked, but unfortunately the parser generated is not the expected
>> one. It seems that my grammars are "deprecated", for example look at
>> this error:
>> ... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
>> escaped symbol "$Globals" as a keyword has been deprecated. The proper
>> spelling is %Globals
>
> Note that this is just a warning, not an error. It's telling you that the
> new spelling of the directive starts with '%' rather than '$'. [We've done
> this so that the space of macro names (which the programmer controls) is
> clearly distinct from that of directives (which are hard-wired). At some
> point, we may remove support for the old syntax.
>
> The upshot is that your grammar is still perfectly legal, and the generated
> parser should work as you expect. I don't think you should need to use the
> 1.1 binary, but please let us know if the new version doesn't work for you
> (and post details on what you tried and what the result was).
>
>> Upgrading my grammars is not an option, since I'm extending Eclipse
>> MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
>> "deprecated" too...
>>
>> So i still need to build a binary program from lpg v1.1 soure code
>> (lpgdistribution package) which works in Linux Environments...And i
>> don't find the way out to do it :(
>>
>> Do you have anymore ideas?...
>>
>> Best Regards,
>> Adolfo.
>>
>>
>> Adolfo Sánchez-Barbudo Herrera escribió:
>>> Hi Robert,
>>>
>>> Comments in-line below:
>>>
>>> Robert M. Fuhrer escribió:
>>>> Adolfo Sánchez-Barbudo Herrera wrote:
>>>>> Hi Robert,
>>>>>
>>>>> I have some questions for you...
>>>>>
>>>>> I'm working with LPG to generate a parser from some grammar
>>>>> files...At this moment I'm not using IMP project since I'm working
>>>>> with Ganymede's milestones and I just want to use the Parser
>>>>> Generator. Generating the IDE can be set off...
>>>>>
>>>>> The problem is that I was working with WinXP OS, and I used the
>>>>> lpg.exe program to generate the lexer, parser, etc... I have moved
>>>>> to a Linux - Environment and I have tried to recompile the source
>>>>> code with no success...
>>>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>>>> - I tried it with g++ linux-programme with no success.
>>>>>
>>>>> Isn't LPG thought to work in a Linux Env ?
>>>>> Could you give some clue to tackle this problem?
>>>> LPG *should* build fine out of the box with any recent version of g++,
>>>> however, we haven't had the time to get a g++-based build to work on
>>>> Windows. "cl" indeed refers to the Microsoft C++
>>>> compiler.
>>>>
>>>> If you're having trouble compiling LPG with g++, please post details
>>>> about the errors you're seeing, so we can help diagnose the problems.
>>> I'm using lpgdistribution from sourceforge. And I try to built the
>>> sourcecode included...
>>>
>>> What i have changed in order to run the makefile:
>>> GCPPC=g++ -O -DNDEBUG
>>> #GCPPC=cl -O -DNDEBUG -EHsc
>>>
>>> The g++ compiler doesn't understand all that options (Only -E one). I
>>> don't know what are its intention in cl compiler.
>>>
>>> The output (translated):
>>> g++ -O -DNDEBUG -c jikespg.cpp
>>> g++ -O -DNDEBUG -c symbol.cpp
>>> g++ -O -DNDEBUG -c code.cpp
>>> g++ -O -DNDEBUG -c util.cpp
>>> util.cpp: In function ‘int SystemMkdir(char*)’:
>>> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
>>> make: *** [util.obj] Error 1
>>>
>>> Besides:
>>> It seems to be a rule related to generic.cpp file, when it doesn't
>>> exists in the sourcecode folder.
>>>
>>> I hope, this info suffice...
>>>> BTW, we've recently migrated to using plugin fragments to house the
>>>> platform-specific binaries. The fragments have names like:
>>>>
>>>> lpg.generator.win32_x86 and
>>>> lpg.generator.linux_x86
>>>>
>>> Well, i'll try this...
>>>> The update manager should automagically pick up the right fragment
>>>> given the platform on which you're running Eclipse. This has worked
>>>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>>>> but then I'm installing on the same kind of machines on which I built
>>>> the binaries, and I don't have any other Linux platforms to test on.
>>>>
>>> I didn't know about imp installation through the update manager...
>>> What update site uses ?¿?
>>> Any official Eclipse site ?
>>>
>>> I'll try it...
>>>
>>>> There's a problem with this mechanism, though: it appears to me that
>>>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>>>> "ws" variables) doesn't provide enough information to distinguish
>>>> Linux boxes running, say, different versions of gcc/libc. As a result,
>>>> a plugin fragment may seem to Eclipse to be appropriate for running on
>>>> a given kind of host, when in reality it isn't. I'm not sure how to
>>>> address this problem at this point. Any help here would be greatly
>>>> appreciated!
>>> Well, i have no knowledge or experience about this. If I have any idea
>>> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>>>> Of course we wouldn't have this problem if LPG were a Java program,
>>>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>>>> there?
>>>>
>>> Cheers,
>>> Adolfo.
>
>
Re: LPG in linux [message #569267 is a reply to message #16493] Sat, 16 February 2008 15:36 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Adolfo Sánchez-Barbudo Herrera wrote:
> Hi Robert,
>
> I have some questions for you...
>
> I'm working with LPG to generate a parser from some grammar files...At
> this moment I'm not using IMP project since I'm working with Ganymede's
> milestones and I just want to use the Parser Generator. Generating the
> IDE can be set off...
>
> The problem is that I was working with WinXP OS, and I used the lpg.exe
> program to generate the lexer, parser, etc... I have moved to a Linux -
> Environment and I have tried to recompile the source code with no
> success...
> - cl compiler used by the Makefile seems to be a Windows programme.
> - I tried it with g++ linux-programme with no success.
>
> Isn't LPG thought to work in a Linux Env ?
> Could you give some clue to tackle this problem?

LPG *should* build fine out of the box with any recent version of g++,
however, we haven't had the time to get a g++-based build to work on
Windows. [In theory we should be able to use mingw and link statically,
but no one has yet done that.] "cl" indeed refers to the Microsoft C++
compiler.

If you're having trouble compiling LPG with g++, please post details
about the errors you're seeing, so we can help diagnose the problems.

BTW, we've recently migrated to using plugin fragments to house the
platform-specific binaries. The fragments have names like:

lpg.generator.win32_x86 and
lpg.generator.linux_x86

The update manager should automagically pick up the right fragment
given the platform on which you're running Eclipse. This has worked
for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
but then I'm installing on the same kind of machines on which I built
the binaries, and I don't have any other Linux platforms to test on.

There's a problem with this mechanism, though: it appears to me that
the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
"ws" variables) doesn't provide enough information to distinguish
Linux boxes running, say, different versions of gcc/libc. As a result,
a plugin fragment may seem to Eclipse to be appropriate for running on
a given kind of host, when in reality it isn't. I'm not sure how to
address this problem at this point. Any help here would be greatly
appreciated!

Of course we wouldn't have this problem if LPG were a Java program,
but we don't have the bandwidth to rewrite it in Java. [Any takers
there?]

--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Team Lead (http://eclipse-imp.sourceforge.net)
X10: Productivity for High-Performance Parallel Programming (http://x10.sf.net)
Re: LPG in linux [message #569290 is a reply to message #16529] Sun, 17 February 2008 12:05 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

Comments in-line below:

Robert M. Fuhrer escribió:
> Adolfo Sánchez-Barbudo Herrera wrote:
>> Hi Robert,
>>
>> I have some questions for you...
>>
>> I'm working with LPG to generate a parser from some grammar files...At
>> this moment I'm not using IMP project since I'm working with
>> Ganymede's milestones and I just want to use the Parser Generator.
>> Generating the IDE can be set off...
>>
>> The problem is that I was working with WinXP OS, and I used the
>> lpg.exe program to generate the lexer, parser, etc... I have moved to
>> a Linux - Environment and I have tried to recompile the source code
>> with no success...
>> - cl compiler used by the Makefile seems to be a Windows programme.
>> - I tried it with g++ linux-programme with no success.
>>
>> Isn't LPG thought to work in a Linux Env ?
>> Could you give some clue to tackle this problem?
>
> LPG *should* build fine out of the box with any recent version of g++,
> however, we haven't had the time to get a g++-based build to work on
> Windows. "cl" indeed refers to the Microsoft C++
> compiler.
>
> If you're having trouble compiling LPG with g++, please post details
> about the errors you're seeing, so we can help diagnose the problems.

I'm using lpgdistribution from sourceforge. And I try to built the
sourcecode included...

What i have changed in order to run the makefile:
GCPPC=g++ -O -DNDEBUG
#GCPPC=cl -O -DNDEBUG -EHsc

The g++ compiler doesn't understand all that options (Only -E one). I
don't know what are its intention in cl compiler.

The output (translated):
g++ -O -DNDEBUG -c jikespg.cpp
g++ -O -DNDEBUG -c symbol.cpp
g++ -O -DNDEBUG -c code.cpp
g++ -O -DNDEBUG -c util.cpp
util.cpp: In function ‘int SystemMkdir(char*)’:
util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
make: *** [util.obj] Error 1

Besides:
It seems to be a rule related to generic.cpp file, when it doesn't
exists in the sourcecode folder.

I hope, this info suffice...
>
> BTW, we've recently migrated to using plugin fragments to house the
> platform-specific binaries. The fragments have names like:
>
> lpg.generator.win32_x86 and
> lpg.generator.linux_x86
>

Well, i'll try this...
> The update manager should automagically pick up the right fragment
> given the platform on which you're running Eclipse. This has worked
> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
> but then I'm installing on the same kind of machines on which I built
> the binaries, and I don't have any other Linux platforms to test on.
>

I didn't know about imp installation through the update manager...
What update site uses ?¿?
Any official Eclipse site ?

I'll try it...

> There's a problem with this mechanism, though: it appears to me that
> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
> "ws" variables) doesn't provide enough information to distinguish
> Linux boxes running, say, different versions of gcc/libc. As a result,
> a plugin fragment may seem to Eclipse to be appropriate for running on
> a given kind of host, when in reality it isn't. I'm not sure how to
> address this problem at this point. Any help here would be greatly
> appreciated!

Well, i have no knowledge or experience about this. If I have any idea
or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
> Of course we wouldn't have this problem if LPG were a Java program,
> but we don't have the bandwidth to rewrite it in Java. [Any takers
> there?
>

Cheers,
Adolfo.
Re: LPG in linux [message #569317 is a reply to message #16546] Mon, 18 February 2008 17:26 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

I have tried binary program from:

lpg.generator.linux_x86 project.

It worked, but unfortunately the parser generated is not the expected
one. It seems that my grammars are "deprecated", for example look at
this error:
.... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
escaped symbol "$Globals" as a keyword has been deprecated. The proper
spelling is %Globals

Upgrading my grammars is not an option, since I'm extending Eclipse
MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
"deprecated" too...

So i still need to build a binary program from lpg v1.1 soure code
(lpgdistribution package) which works in Linux Environments...And i
don't find the way out to do it :(

Do you have anymore ideas?...

Best Regards,
Adolfo.


Adolfo Sánchez-Barbudo Herrera escribió:
> Hi Robert,
>
> Comments in-line below:
>
> Robert M. Fuhrer escribió:
>> Adolfo Sánchez-Barbudo Herrera wrote:
>>> Hi Robert,
>>>
>>> I have some questions for you...
>>>
>>> I'm working with LPG to generate a parser from some grammar
>>> files...At this moment I'm not using IMP project since I'm working
>>> with Ganymede's milestones and I just want to use the Parser
>>> Generator. Generating the IDE can be set off...
>>>
>>> The problem is that I was working with WinXP OS, and I used the
>>> lpg.exe program to generate the lexer, parser, etc... I have moved to
>>> a Linux - Environment and I have tried to recompile the source code
>>> with no success...
>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>> - I tried it with g++ linux-programme with no success.
>>>
>>> Isn't LPG thought to work in a Linux Env ?
>>> Could you give some clue to tackle this problem?
>>
>> LPG *should* build fine out of the box with any recent version of g++,
>> however, we haven't had the time to get a g++-based build to work on
>> Windows. "cl" indeed refers to the Microsoft C++
>> compiler.
>>
>> If you're having trouble compiling LPG with g++, please post details
>> about the errors you're seeing, so we can help diagnose the problems.
>
> I'm using lpgdistribution from sourceforge. And I try to built the
> sourcecode included...
>
> What i have changed in order to run the makefile:
> GCPPC=g++ -O -DNDEBUG
> #GCPPC=cl -O -DNDEBUG -EHsc
>
> The g++ compiler doesn't understand all that options (Only -E one). I
> don't know what are its intention in cl compiler.
>
> The output (translated):
> g++ -O -DNDEBUG -c jikespg.cpp
> g++ -O -DNDEBUG -c symbol.cpp
> g++ -O -DNDEBUG -c code.cpp
> g++ -O -DNDEBUG -c util.cpp
> util.cpp: In function ‘int SystemMkdir(char*)’:
> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
> make: *** [util.obj] Error 1
>
> Besides:
> It seems to be a rule related to generic.cpp file, when it doesn't
> exists in the sourcecode folder.
>
> I hope, this info suffice...
>>
>> BTW, we've recently migrated to using plugin fragments to house the
>> platform-specific binaries. The fragments have names like:
>>
>> lpg.generator.win32_x86 and
>> lpg.generator.linux_x86
>>
>
> Well, i'll try this...
>> The update manager should automagically pick up the right fragment
>> given the platform on which you're running Eclipse. This has worked
>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>> but then I'm installing on the same kind of machines on which I built
>> the binaries, and I don't have any other Linux platforms to test on.
>>
>
> I didn't know about imp installation through the update manager...
> What update site uses ?¿?
> Any official Eclipse site ?
>
> I'll try it...
>
>> There's a problem with this mechanism, though: it appears to me that
>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>> "ws" variables) doesn't provide enough information to distinguish
>> Linux boxes running, say, different versions of gcc/libc. As a result,
>> a plugin fragment may seem to Eclipse to be appropriate for running on
>> a given kind of host, when in reality it isn't. I'm not sure how to
>> address this problem at this point. Any help here would be greatly
>> appreciated!
>
> Well, i have no knowledge or experience about this. If I have any idea
> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>> Of course we wouldn't have this problem if LPG were a Java program,
>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>> there?
>>
>
> Cheers,
> Adolfo.
Re: LPG in linux [message #569477 is a reply to message #16563] Wed, 20 February 2008 20:56 Go to previous message
Robert M. Fuhrer is currently offline Robert M. FuhrerFriend
Messages: 294
Registered: July 2009
Senior Member
Adolfo Sánchez-Barbudo Herrera wrote:
> Hi Robert,
>
> I have tried binary program from:
>
> lpg.generator.linux_x86 project.
>
> It worked, but unfortunately the parser generated is not the expected
> one. It seems that my grammars are "deprecated", for example look at
> this error:
> ... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
> escaped symbol "$Globals" as a keyword has been deprecated. The proper
> spelling is %Globals

Note that this is just a warning, not an error. It's telling you that the
new spelling of the directive starts with '%' rather than '$'. [We've done
this so that the space of macro names (which the programmer controls) is
clearly distinct from that of directives (which are hard-wired). At some
point, we may remove support for the old syntax.

The upshot is that your grammar is still perfectly legal, and the generated
parser should work as you expect. I don't think you should need to use the
1.1 binary, but please let us know if the new version doesn't work for you
(and post details on what you tried and what the result was).

> Upgrading my grammars is not an option, since I'm extending Eclipse
> MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
> "deprecated" too...
>
> So i still need to build a binary program from lpg v1.1 soure code
> (lpgdistribution package) which works in Linux Environments...And i
> don't find the way out to do it :(
>
> Do you have anymore ideas?...
>
> Best Regards,
> Adolfo.
>
>
> Adolfo Sánchez-Barbudo Herrera escribió:
>> Hi Robert,
>>
>> Comments in-line below:
>>
>> Robert M. Fuhrer escribió:
>>> Adolfo Sánchez-Barbudo Herrera wrote:
>>>> Hi Robert,
>>>>
>>>> I have some questions for you...
>>>>
>>>> I'm working with LPG to generate a parser from some grammar
>>>> files...At this moment I'm not using IMP project since I'm working
>>>> with Ganymede's milestones and I just want to use the Parser
>>>> Generator. Generating the IDE can be set off...
>>>>
>>>> The problem is that I was working with WinXP OS, and I used the
>>>> lpg.exe program to generate the lexer, parser, etc... I have moved
>>>> to a Linux - Environment and I have tried to recompile the source
>>>> code with no success...
>>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>>> - I tried it with g++ linux-programme with no success.
>>>>
>>>> Isn't LPG thought to work in a Linux Env ?
>>>> Could you give some clue to tackle this problem?
>>>
>>> LPG *should* build fine out of the box with any recent version of g++,
>>> however, we haven't had the time to get a g++-based build to work on
>>> Windows. "cl" indeed refers to the Microsoft C++
>>> compiler.
>>>
>>> If you're having trouble compiling LPG with g++, please post details
>>> about the errors you're seeing, so we can help diagnose the problems.
>>
>> I'm using lpgdistribution from sourceforge. And I try to built the
>> sourcecode included...
>>
>> What i have changed in order to run the makefile:
>> GCPPC=g++ -O -DNDEBUG
>> #GCPPC=cl -O -DNDEBUG -EHsc
>>
>> The g++ compiler doesn't understand all that options (Only -E one). I
>> don't know what are its intention in cl compiler.
>>
>> The output (translated):
>> g++ -O -DNDEBUG -c jikespg.cpp
>> g++ -O -DNDEBUG -c symbol.cpp
>> g++ -O -DNDEBUG -c code.cpp
>> g++ -O -DNDEBUG -c util.cpp
>> util.cpp: In function ‘int SystemMkdir(char*)’:
>> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
>> make: *** [util.obj] Error 1
>>
>> Besides:
>> It seems to be a rule related to generic.cpp file, when it doesn't
>> exists in the sourcecode folder.
>>
>> I hope, this info suffice...
>>>
>>> BTW, we've recently migrated to using plugin fragments to house the
>>> platform-specific binaries. The fragments have names like:
>>>
>>> lpg.generator.win32_x86 and
>>> lpg.generator.linux_x86
>>>
>>
>> Well, i'll try this...
>>> The update manager should automagically pick up the right fragment
>>> given the platform on which you're running Eclipse. This has worked
>>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>>> but then I'm installing on the same kind of machines on which I built
>>> the binaries, and I don't have any other Linux platforms to test on.
>>>
>>
>> I didn't know about imp installation through the update manager...
>> What update site uses ?¿?
>> Any official Eclipse site ?
>>
>> I'll try it...
>>
>>> There's a problem with this mechanism, though: it appears to me that
>>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>>> "ws" variables) doesn't provide enough information to distinguish
>>> Linux boxes running, say, different versions of gcc/libc. As a result,
>>> a plugin fragment may seem to Eclipse to be appropriate for running on
>>> a given kind of host, when in reality it isn't. I'm not sure how to
>>> address this problem at this point. Any help here would be greatly
>>> appreciated!
>>
>> Well, i have no knowledge or experience about this. If I have any idea
>> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>>> Of course we wouldn't have this problem if LPG were a Java program,
>>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>>> there?
>>>
>>
>> Cheers,
>> Adolfo.


--
Cheers,
-- Bob

--------------------------------
Robert M. Fuhrer
Research Staff Member
Programming Technologies Dept.
IBM T.J. Watson Research Center

IMP Team Lead (http://eclipse-imp.sourceforge.net)
X10: Productivity for High-Performance Parallel Programming (http://x10.sf.net)
Re: LPG in linux [message #569720 is a reply to message #16635] Wed, 27 February 2008 10:38 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 260
Registered: July 2009
Senior Member
Hi Robert,

I'm sorry for the delay.

It didn't work, the generated parser had a lot of errors, a lot of cases
of the switch broken etc. So the grammar which works well with v1.1
binary doesn't work with the linux binary v2.

I finally solved the problem using the v1.1 executable (for windows)
with the linux wine program (which lets me execute windows programs).

I know that is not a smart solution, but it suffices me ;), and maybe
someone.

Best Regards,
Adolfo.

Robert M. Fuhrer escribió:
> Adolfo Sánchez-Barbudo Herrera wrote:
>> Hi Robert,
>>
>> I have tried binary program from:
>>
>> lpg.generator.linux_x86 project.
>>
>> It worked, but unfortunately the parser generated is not the expected
>> one. It seems that my grammars are "deprecated", for example look at
>> this error:
>> ... /KeywordTemplateD.g:55:1:55:8:1286:1293: Warning: The use of the
>> escaped symbol "$Globals" as a keyword has been deprecated. The proper
>> spelling is %Globals
>
> Note that this is just a warning, not an error. It's telling you that the
> new spelling of the directive starts with '%' rather than '$'. [We've done
> this so that the space of macro names (which the programmer controls) is
> clearly distinct from that of directives (which are hard-wired). At some
> point, we may remove support for the old syntax.
>
> The upshot is that your grammar is still perfectly legal, and the generated
> parser should work as you expect. I don't think you should need to use the
> 1.1 binary, but please let us know if the new version doesn't work for you
> (and post details on what you tried and what the result was).
>
>> Upgrading my grammars is not an option, since I'm extending Eclipse
>> MDT-OCL project, which uses the version 1.1 of LPG, and its grammars are
>> "deprecated" too...
>>
>> So i still need to build a binary program from lpg v1.1 soure code
>> (lpgdistribution package) which works in Linux Environments...And i
>> don't find the way out to do it :(
>>
>> Do you have anymore ideas?...
>>
>> Best Regards,
>> Adolfo.
>>
>>
>> Adolfo Sánchez-Barbudo Herrera escribió:
>>> Hi Robert,
>>>
>>> Comments in-line below:
>>>
>>> Robert M. Fuhrer escribió:
>>>> Adolfo Sánchez-Barbudo Herrera wrote:
>>>>> Hi Robert,
>>>>>
>>>>> I have some questions for you...
>>>>>
>>>>> I'm working with LPG to generate a parser from some grammar
>>>>> files...At this moment I'm not using IMP project since I'm working
>>>>> with Ganymede's milestones and I just want to use the Parser
>>>>> Generator. Generating the IDE can be set off...
>>>>>
>>>>> The problem is that I was working with WinXP OS, and I used the
>>>>> lpg.exe program to generate the lexer, parser, etc... I have moved
>>>>> to a Linux - Environment and I have tried to recompile the source
>>>>> code with no success...
>>>>> - cl compiler used by the Makefile seems to be a Windows programme.
>>>>> - I tried it with g++ linux-programme with no success.
>>>>>
>>>>> Isn't LPG thought to work in a Linux Env ?
>>>>> Could you give some clue to tackle this problem?
>>>> LPG *should* build fine out of the box with any recent version of g++,
>>>> however, we haven't had the time to get a g++-based build to work on
>>>> Windows. "cl" indeed refers to the Microsoft C++
>>>> compiler.
>>>>
>>>> If you're having trouble compiling LPG with g++, please post details
>>>> about the errors you're seeing, so we can help diagnose the problems.
>>> I'm using lpgdistribution from sourceforge. And I try to built the
>>> sourcecode included...
>>>
>>> What i have changed in order to run the makefile:
>>> GCPPC=g++ -O -DNDEBUG
>>> #GCPPC=cl -O -DNDEBUG -EHsc
>>>
>>> The g++ compiler doesn't understand all that options (Only -E one). I
>>> don't know what are its intention in cl compiler.
>>>
>>> The output (translated):
>>> g++ -O -DNDEBUG -c jikespg.cpp
>>> g++ -O -DNDEBUG -c symbol.cpp
>>> g++ -O -DNDEBUG -c code.cpp
>>> g++ -O -DNDEBUG -c util.cpp
>>> util.cpp: In function ‘int SystemMkdir(char*)’:
>>> util.cpp:28: error: ‘_IFDIR’ isn't declared in this scope
>>> make: *** [util.obj] Error 1
>>>
>>> Besides:
>>> It seems to be a rule related to generic.cpp file, when it doesn't
>>> exists in the sourcecode folder.
>>>
>>> I hope, this info suffice...
>>>> BTW, we've recently migrated to using plugin fragments to house the
>>>> platform-specific binaries. The fragments have names like:
>>>>
>>>> lpg.generator.win32_x86 and
>>>> lpg.generator.linux_x86
>>>>
>>> Well, i'll try this...
>>>> The update manager should automagically pick up the right fragment
>>>> given the platform on which you're running Eclipse. This has worked
>>>> for me on my Linux boxes (Intel- and AMD-based boxes running Gentoo),
>>>> but then I'm installing on the same kind of machines on which I built
>>>> the binaries, and I don't have any other Linux platforms to test on.
>>>>
>>> I didn't know about imp installation through the update manager...
>>> What update site uses ?¿?
>>> Any official Eclipse site ?
>>>
>>> I'll try it...
>>>
>>>> There's a problem with this mechanism, though: it appears to me that
>>>> the Eclipse platform metadata (e.g. the "os", "arch", "platform" and
>>>> "ws" variables) doesn't provide enough information to distinguish
>>>> Linux boxes running, say, different versions of gcc/libc. As a result,
>>>> a plugin fragment may seem to Eclipse to be appropriate for running on
>>>> a given kind of host, when in reality it isn't. I'm not sure how to
>>>> address this problem at this point. Any help here would be greatly
>>>> appreciated!
>>> Well, i have no knowledge or experience about this. If I have any idea
>>> or clue I'll post it. BTW, it doesn't seem to be a trivial issue...
>>>> Of course we wouldn't have this problem if LPG were a Java program,
>>>> but we don't have the bandwidth to rewrite it in Java. [Any takers
>>>> there?
>>>>
>>> Cheers,
>>> Adolfo.
>
>
Previous Topic:CVS HEAD (20080221) build woes
Next Topic:CVS HEAD (20080221) build woes
Goto Forum:
  


Current Time: Fri Apr 19 10:05:32 GMT 2024

Powered by FUDForum. Page generated in 0.03667 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top