Recent

Author Topic: r1042 fails to compile under FreeBSD  (Read 4356 times)

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
r1042 fails to compile under FreeBSD
« on: April 15, 2015, 09:15:18 am »
Hi,

[starting a new thread with more specific subject line]

I've just checked out the latest LazPaint from SourceForge and tried to compile BGRABitmap under FreeBSD as you requested. I tried with FPC 2.6.4, 3.0.1 and 3.1.1 - all give the exact same result.

It fails on the newly introduced LoadFromDevice() methods but I can't actually understand why FPC complains. The declarations look correct to me, but then it is early morning. ;-)

Good news is that if I revert the recent changes and move to r1039 then BGRABitmap package compiles without error on FreeBSD. I haven't tested BGRABitmap yet, but it compiles on r1039. :)

Code: [Select]
Compile package FCL 1.0.1: Success
Compile package LazUtils 1.0: Success, Hints: 1
ttfile.pas(374,5) Hint: User defined: workaround for fpc bug 23868 when compiling with -O2
Compile package LCLBase 1.5: Success
Compile package LCL 1.5: Success, Hints: 2
gtk2wsforms.pp(1002,8) Note: User defined: test with smaller minor versions and check where LM_CONFIGUREEVENT is needed.
interfaces.pas(32,3) Hint: Unit "gtk2DisableLibOverlay" not used in Interfaces
Compile package BGRABitmapPack 8.2: Exit code 256, Errors: 2, Warnings: 18, Hints: 5
bgrabitmaptypes.pas(4238,29) Warning: Symbol "UTF8LowerCase" is deprecated: "Use the function in LazUTF8 unit"
bgrabitmaptypes.pas(4239,43) Warning: Symbol "UTF8Copy" is deprecated: "Use the function in LazUTF8 unit"
bgrabitmaptypes.pas(4265,10) Warning: Symbol "UTF8LowerCase" is deprecated: "Use the function in LazUTF8 unit"
bgratext.pas(780,13) Warning: Symbol "UTF8CharStart" is deprecated: "Use the function in LazUTF8 unit"
bgratext.pas(1136,10) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratext.pas(1145,59) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratext.pas(1155,12) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(558,16) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(615,18) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(665,23) Warning: Symbol "UTF8Length" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(674,18) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(713,14) Warning: Symbol "UnicodeToUTF8" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(741,16) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgratypewriter.pas(896,18) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgravectorize.pas(1487,21) Warning: Symbol "UTF8Length" is deprecated: "Use the function in LazUTF8 unit"
bgravectorize.pas(1493,16) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgravectorize.pas(1529,18) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgravectorize.pas(1576,18) Warning: Symbol "UTF8CharacterLength" is deprecated: "Use the function in LazUTF8 unit"
bgradefaultbitmap.pas(1074,30) Error: function header doesn't match any method of this class "TBGRADefaultBitmap.LoadFromDevice(THandle);"
bgradefaultbitmap.pas(238,15) Hint: Found declaration: TBGRADefaultBitmap.LoadFromDevice(LongInt);
bgradefaultbitmap.pas(239,15) Hint: Found declaration: TBGRADefaultBitmap.LoadFromDevice(LongInt,TRect);
bgradefaultbitmap.pas(1096,30) Error: function header doesn't match any method of this class "TBGRADefaultBitmap.LoadFromDevice(THandle,TRect);"
bgradefaultbitmap.pas(238,15) Hint: Found declaration: TBGRADefaultBitmap.LoadFromDevice(LongInt);
bgradefaultbitmap.pas(239,15) Hint: Found declaration: TBGRADefaultBitmap.LoadFromDevice(LongInt,TRect);
bgradefaultbitmap.pas(1074,30) Hint: Found declaration: TBGRADefaultBitmap.LoadFromDevice(THandle);

« Last Edit: April 15, 2015, 09:29:54 am by Graeme Geldenhuys »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: r1042 fails to compile under FreeBSD
« Reply #1 on: April 15, 2015, 02:36:12 pm »
It may be related to the type THandle if it is redefined in two different units. When you CTRL-Click on the types in both method declarations, do you get to the same unit?
Conscience is the debugger of the mind

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: r1042 fails to compile under FreeBSD
« Reply #2 on: April 15, 2015, 03:34:36 pm »
Well done, you hit the nail on the head.

In the Interface section of the unit a Ctrl+Click takes me to SysUtils.THandle, but in the Implementation section of that unit it takes me to LCLType.THandle.

ps:
All of the examples in the bgraaggtest directory compile and run just fine under FreeBSD. So other than this THandle problem, it seems BGRABitmap works without issues on FreeBSD 64-bit. Next I'll try the BGRAControls and see how they fares.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: r1042 fails to compile under FreeBSD
« Reply #3 on: April 20, 2015, 07:05:34 am »
Today I tryed to install bgrabitmap on lubuntu and failed.. i'll try again don't remember exactly the problem, something like "tbgraptrbitmap" missing.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: r1042 fails to compile under FreeBSD
« Reply #4 on: April 20, 2015, 10:47:22 am »
Today I tryed to install bgrabitmap on lubuntu and failed..
Umm, this thread was about FreeBSD only - Lubuntu is Linux. May I suggest you rather start a new thread - that way people looking only at the subject lines know the real topic of a message thread.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: r1042 fails to compile under FreeBSD
« Reply #5 on: April 20, 2015, 12:19:15 pm »
In fact it is a bit related. It was a problem with Gtk unit. Thanks 007.

It is fixed in version 8.3.1.

By the way Graeme, does it compile on FreeBSD now?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: r1042 fails to compile under FreeBSD
« Reply #6 on: April 20, 2015, 12:40:12 pm »
Nice! Hope I can compile my bgra programs under linux, I not tested them in long time in that OS.

 

TinyPortal © 2005-2018