Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-10

gpm library compiled by default ?

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

James Mills

Hi,

I noticed the other day that one of my FPC programs which does not in anyway shape or form use the gpm or any mouse libraries actually requires the gpm library to be installed.

It seems the fpc 1.0.10 is compiling programs and requiring libgpm to be installed.

Why is this ?

cheers
James

-Zero Defect Software Engineers Group - ZDSEG - -Web: http://daisy.ods.org/ -Wiki: http://daisy.ods.org/~prologic/wiki/ -ICQ: 98888663 - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.
Peter Vreman
to James Mills
Show quoted text 10 lines
Hi, I noticed the other day that one of my FPC programs which does not in anyway shape or form use the gpm or any mouse libraries actually requires the gpm library to be installed. It seems the fpc 1.0.10 is compiling programs and requiring libgpm to be installed. Why is this ?

Compile with -vu to see which unit uses gpm

Laurent Cocea

Don't know whether in my case it's libgpm-related but console pas code I have developed on Linux under fpc-1.0.6 doesn't compile under 1.0.10 so I downgraded to 1.0.6 and everything's fine.

-Laurent

James Mills wrote
It seems the fpc 1.0.10 is compiling programs and requiring libgpm to

be

installed. Why is this ?
Michalis Kamburelis
to James Mills: I noticed the other day that one of my FPC programs which does not in anyway shape or…
James Mills wrote 14 lines
Hi, I noticed the other day that one of my FPC programs which does not in anyway shape or form use the gpm or any mouse libraries actually requires the gpm library to be installed. It seems the fpc 1.0.10 is compiling programs and requiring libgpm to be installed. Why is this ? cheers James

Maybe you're using the Keyboard unit ? This unit uses Mouse in it's implementation, and by default unit Mouse uses Gpm unit (that links to libgpm). If you don't want to depend on libgpm you can recompile Mouse with symbol NOGPM defined (or even with NOMOUSE defined since you don't use mouse at all).

Michalis

James Mills
to Michalis Kamburelis
Michalis Kamburelis wrote 5 lines
Maybe you're using the Keyboard unit ? This unit uses Mouse in it's implementation, and by default unit Mouse uses Gpm unit (that links to libgpm). If you don't want to depend on libgpm you can recompile Mouse with symbol NOGPM defined (or even with NOMOUSE defined since you don't use mouse at all).

I think I do use the KeyBoard unit. So I could compile it with fpc -dNOMOUSE ?

cheers
James

-Zero Defect Software Engineers Group - ZDSEG - -Web: http://daisy.ods.org/ -Wiki: http://daisy.ods.org/~prologic/wiki/ -ICQ: 98888663 - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.
Marco van de Voort
to James Mills
Show quoted text 9 lines
On Wed, Oct 22, 2003 at 10:53:51PM +0200, Michalis Kamburelis wrote: > Maybe you're using the Keyboard unit ? This unit uses Mouse in it's > implementation, and by default unit Mouse uses Gpm unit (that links to > libgpm). If you don't want to depend on libgpm you can recompile Mouse > with symbol NOGPM defined (or even with NOMOUSE defined since you don't > use mouse at all). I think I do use the KeyBoard unit. So I could compile it with fpc -dNOMOUSE ?

Yes. Under FreeBSD this is default even.

James Mills
to Marco van de Voort
Marco van de Voort wrote 11 lines
> On Wed, Oct 22, 2003 at 10:53:51PM +0200, Michalis Kamburelis wrote: > > Maybe you're using the Keyboard unit ? This unit uses Mouse in it's > > implementation, and by default unit Mouse uses Gpm unit (that links to > > libgpm). If you don't want to depend on libgpm you can recompile Mouse > > with symbol NOGPM defined (or even with NOMOUSE defined since you don't > > use mouse at all). > > I think I do use the KeyBoard unit. So I could compile it with fpc > -dNOMOUSE ? Yes. Under FreeBSD this is default even.

Compiling with this option makes no difference. It will still compile and require the gpm library.

Any other suggestion ? IHMO, A console app that just uses the KeyBoard should not need the gpm library in it's binary :)

cheers
James

-Zero Defect Software Engineers Group - ZDSEG - -Web: http://daisy.ods.org/ -Wiki: http://daisy.ods.org/~prologic/wiki/ -ICQ: 98888663 - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.
Michalis Kamburelis
to James Mills
James Mills wrote 25 lines
On Thu, Oct 23, 2003 at 09:16:19AM +0200, Marco van de Voort wrote: >>On Wed, Oct 22, 2003 at 10:53:51PM +0200, Michalis Kamburelis wrote: >> >>>Maybe you're using the Keyboard unit ? This unit uses Mouse in it's >>>implementation, and by default unit Mouse uses Gpm unit (that links to >>>libgpm). If you don't want to depend on libgpm you can recompile Mouse >>>with symbol NOGPM defined (or even with NOMOUSE defined since you don't >>>use mouse at all). >> >>I think I do use the KeyBoard unit. So I could compile it with fpc >>-dNOMOUSE ? > >Yes. Under FreeBSD this is default even. Compiling with this option makes no difference. It will still compile and require the gpm library. Any other suggestion ? IHMO, A console app that just uses the KeyBoard should not need the gpm library in it's binary :) cheers James

From your answer I understand that you are recompiling Keyboard unit with -dNOMOUSE, which is pointless. I wrote (maybe it was not clear enough, sorry) that you should recompile _Mouse_ unit (not Keyboard unit).

If this is not the case and you're doing as I said (recompiling Mouse unit), you should make sure that you're really linking your program with the newly compiled Mouse unit. E.g. you can check this by adding a small Writeln('something...') to initialization section of Mouse unit or by compiling with -vu.

If you're 100% sure that you're compiling your program with Mouse unit that does not require Gpm unit than it means that some other unit uses Gpm unit (I assume here that there is no other unit that links to libgpm library directly, without using Gpm unit). There is not such unit in FPC 1.0.10 RTL, but that doesn't mean anything... So in this case you should use Peter Vreman's advice and recompile program with -vu to see what other unit uses Gpm unit.

Michalis

Marco van de Voort
to James Mills: Compiling with this option makes no difference. It will still compile and require the gpm…
Show quoted text 15 lines
On Thu, Oct 23, 2003 at 09:16:19AM +0200, Marco van de Voort wrote: > > On Wed, Oct 22, 2003 at 10:53:51PM +0200, Michalis Kamburelis wrote: > > > Maybe you're using the Keyboard unit ? This unit uses Mouse in it's > > > implementation, and by default unit Mouse uses Gpm unit (that links to > > > libgpm). If you don't want to depend on libgpm you can recompile Mouse > > > with symbol NOGPM defined (or even with NOMOUSE defined since you don't > > > use mouse at all). > > > > I think I do use the KeyBoard unit. So I could compile it with fpc > > -dNOMOUSE ? > > Yes. Under FreeBSD this is default even. Compiling with this option makes no difference. It will still compile and require the gpm library.

You recompiled the _RTL_ with -dNOMOUSE ?

James Mills
to Michalis Kamburelis: From your answer I understand that you are recompiling Keyboard unit with -dNOMOUSE,…
Michalis Kamburelis wrote 17 lines
From your answer I understand that you are recompiling Keyboard unit with -dNOMOUSE, which is pointless. I wrote (maybe it was not clear enough, sorry) that you should recompile _Mouse_ unit (not Keyboard unit). If this is not the case and you're doing as I said (recompiling Mouse unit), you should make sure that you're really linking your program with the newly compiled Mouse unit. E.g. you can check this by adding a small Writeln('something...') to initialization section of Mouse unit or by compiling with -vu. If you're 100% sure that you're compiling your program with Mouse unit that does not require Gpm unit than it means that some other unit uses Gpm unit (I assume here that there is no other unit that links to libgpm library directly, without using Gpm unit). There is not such unit in FPC 1.0.10 RTL, but that doesn't mean anything... So in this case you should use Peter Vreman's advice and recompile program with -vu to see what other unit uses Gpm unit.

Ok I was a tad bit confused. You originally said to recompile the RTL, which I don't really want to do anyway, and I don't have the sources to recompile. I'll just stick with the main stream version :)

People that use my console programs are just gonna have to have the gpm library installed now aren't they :)

cheers
James

-Zero Defect Software Engineers Group - ZDSEG - -Web: http://daisy.ods.org/ -Wiki: http://daisy.ods.org/~prologic/wiki/ -ICQ: 98888663 - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.