Recent

Author Topic: Bgrabitmap package does not compile  (Read 9605 times)

ironphil

  • Jr. Member
  • **
  • Posts: 58
Bgrabitmap package does not compile
« on: September 23, 2012, 10:16:52 pm »
Recently, in linux (ubuntu 12.04 and 12.10), I get the following message when trying to compile the bgrabitmap lazarus package:
Code: [Select]
../bgrabitmap5.9.4/bgragtkbitmap.pas(70,44) Error: Identifier not found "TGtk2DeviceContext"This is the first error in the log. The other errors seem related to TGtk2DeviceContext not being found.
My Lazarus installation is up to date (SVN) and the bgrabitmap version is the latest. I never had any problem in the past to compile this package. Any idea what is causing this error?

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: Bgrabitmap package does not compile
« Reply #1 on: September 23, 2012, 10:50:33 pm »
I had this same error recently with bgrabitmap version which I never had problems. I deleted bgrabitmap folder and install it again. So maybe try delete bgrabitmap/lib dir and then try to install it again

ironphil

  • Jr. Member
  • **
  • Posts: 58
Re: Bgrabitmap package does not compile
« Reply #2 on: September 23, 2012, 11:19:31 pm »
Good idea but it did not work. I redownloaded bgrabitmap and extracted it. I tried to compile the fresh bgrabitmap and I got the same error message. It works if I switch the whole IDE to qt (obviously, the error seems related to gtk) but I prefer gtk.
I also did a complete reinstall of lazarus (svn) with fpc 2.6.0 and I got the same error message I started to get with my old installation.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Bgrabitmap package does not compile
« Reply #3 on: September 24, 2012, 04:51:22 pm »
Can you try to see if there is something like TGtkDeviceContext ?
Conscience is the debugger of the mind

Sternas Stefanos

  • Full Member
  • ***
  • Posts: 170
  • Ex Pilot, M.Sc, Ph.D
    • http://www.pilotlogic.com
Re: Bgrabitmap package does not compile
« Reply #4 on: September 24, 2012, 05:06:26 pm »
Recently, in linux (ubuntu 12.04 and 12.10), I get the following message when trying to compile the bgrabitmap lazarus package:
Code: [Select]
../bgrabitmap5.9.4/bgragtkbitmap.pas(70,44) Error: Identifier not found "TGtk2DeviceContext"This is the first error in the log. The other errors seem related to TGtk2DeviceContext not being found.
My Lazarus installation is up to date (SVN) and the bgrabitmap version is the latest. I never had any problem in the past to compile this package. Any idea what is causing this error?

In bgragtkbitmap.pas delete lines 69, 70 and 71

line 69  {$IFDEF LCLgtk2}
line 70  type TGtkDeviceContext = TGtk2DeviceContext;
line 71  {$ENDIF}

or wait 1-2 days for the new CT version 2.90...




CodeTyphon Architect and Programmer

ironphil

  • Jr. Member
  • **
  • Posts: 58
Re: Bgrabitmap package does not compile
« Reply #5 on: September 25, 2012, 11:46:22 pm »
Commenting these three lines did it:
Code: [Select]
line 69  {$IFDEF LCLgtk2}
line 70  type TGtkDeviceContext = TGtk2DeviceContext;
line 71  {$ENDIF}

It now compiles nicely. Thanks.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Bgrabitmap package does not compile
« Reply #6 on: December 18, 2012, 09:52:01 pm »
OK I know this is pushing the envelope...I have plunged into the raspberry pi...Now unexpectedly Lazarus ported just fine once the EXT4 partition size was increased to 4 gb.
Now I added some of my own component packages and Lazarus installed them and recompiled slowly but it worked.
Now to the issue some of my projects use bgrabitmap since they use bgracontrols .
Specifically bgrabitmap 6.2 and bgracontrols 2.0.6.0 alpha.( they work fine on win7 pro  64) but on the raspberry pi they won't compile due to using intel assembler and working around it leads to other issues.
Ex perspectivescan2.inc uses intel assembler ...the debian arm of the raspberry pi obviously won't compile this
I hear some have bgracontrols working on the raspberry pi maybe someone can say which version of bitmap and controls they are using?
Better yet can the modules using intel assembler in  perspectivescan2.inc be bypassed as follows?
replace line one with  {$ifdef CPUI386}{$asmmode intel}{$endif}
 It almost does it but next raspberry pi can't find EasyLazFreeType.

« Last Edit: December 18, 2012, 10:09:02 pm by picstart »

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Bgrabitmap package does not compile
« Reply #7 on: December 21, 2012, 10:20:41 am »
The packages bgrabitmap5.7.1 and bgracontrols 1.4.0.0 will mostly work with the raspberry pi but
adjustments are necessary
1) {$ifdef CPU386I} around intel asm {$endif} in bgrabitmap
2) removal of imagelist.pas in bgracontrols
The probabilistic complexity of both the unix files and the lazarus file structure make any initial chance of portability unlikely.
However just as any deck of cards can with care be balanced portability is possible.
 Most languages don't allow such portability so with lazarus at least it is possible.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Bgrabitmap package does not compile
« Reply #8 on: December 23, 2012, 12:54:04 pm »
Have you tried with last subversion of BGRABitmap ?
Conscience is the debugger of the mind

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Bgrabitmap package does not compile
« Reply #9 on: December 23, 2012, 08:49:05 pm »
I won't have a chance to test until next year. I did use the lastest svn before reverting back to the versions above.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Bgrabitmap package does not compile
« Reply #10 on: December 25, 2012, 09:38:29 pm »
Alright.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018