When I try to compile Graphics32 (http://graphics32.org) against carbon I get
Error: Generating PIC, but reference is not PIC-Safe
for GR32_Blend.pas
lea edi, [eax+DivTable]
Why is FPC generating PIC here?
Laz 0.9.29
FPC 2.4.0
Mac OSX Leopard

Mailing lists / lazarus / 2010-06
20 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
When I try to compile Graphics32 (http://graphics32.org) against carbon I get
Error: Generating PIC, but reference is not PIC-Safe
for GR32_Blend.pas
lea edi, [eax+DivTable]
Why is FPC generating PIC here?
Laz 0.9.29
FPC 2.4.0
Mac OSX Leopard
It's default mode for darwin target. Try to compile the project with the additional compiler option (Project Compiler
Options->Other->Custom options): -Cg-
This should disable PIC code generation.
fpc-pascal mailing list is the better place to ask about it: http://lists.freepascal.org/mailman/listinfo/fpc-pascal
thanks,
dmitry
When I try to compile Graphics32 (http://graphics32.org) against carbon I get Error:…
My original port of GR32 was some years ago, probably something changed in the compiler. They have Pascal and ASM versions of parts of the code, probably we should always use Pascal for FPC then.
It's default mode for darwin target. Try to compile the project with the additional …
It does. Didn't know and couldn't find anywhere that a - behind disables an option.
What is the reason for having PIC for darwin? I have read that it slows down and is only useful for libs, if at all.
fpc-pascal mailing list is the better place to ask about it: http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Yesterday I posted something regarding a compenent (VT) there and was told the better place would be here. ;)
Problem is, as the questioner you don't know in advance where it leads to...
My original port of GR32 was some years ago, probably something changed in the compiler.…
My original port of GR32 was some years ago, probably something changed in the compiler. They have Pascal and ASM versions of parts of the code, probably we should always use Pascal for FPC then.
I did not use the port. I use the orginal source. Version 1.9., which is FPC compatible now and seems to work for carbon.
It does. Didn't know and couldn't find anywhere that a - behind disables an option. What…
CA Gorski wroteIt does. Didn't know and couldn't find anywhere that a - behind disables an option.
run fpc (or fpc -h) in command line, you'll find something like this:
Free Pascal Compiler version 2.5.1 [2010/04/05] for i386 Copyright (c) 1993-2009 by Florian Klaempfl
C:\FPC_Laz\root\bin\i386-win32\ppc386.exe [options] <inputfile> [options] *** Put + after a boolean switch option to enable it, - to disable it ***
It should also be said, somewhere in FPC docs.
What is the reason for having PIC for darwin? I have read that it slows down and is only useful for libs, guess Jonas Maebe at fpc-pascal should know the answer.
thanks,
dmitry
I did not use the port. I use the orginal source. Version 1.9., which is FPC compatible…
CA Gorski wroteI did not use the port. I use the orginal source. Version 1.9., which is FPC compatible now and seems to work for carbon.
Sure you use the port, I commited in the official repository and it was merged with the previous sources.
Sure you use the port, I commited in the official repository and it was merged with the previous sources.
Ok, sorry. Didn't know that! ;)
The compiler switch -Cg- solved the PIC problem.
But with GR32 I get randomly can't find unit errors, which disappear after compiling or installing or even rebuilding Lazarus again. Mostly is it GR32_Blend but sometimes also others.
Just from your description of the error I can't say anything, but you are lucky that I now have a contract which involves Graphics32, so I will be testing, updating and expanding the port.
As far as I have more precise infos I will let you know. Would you prefer private mail?
But two things I had to change to compile for carbon are:
GR32_Bindings.pas:
{$I GR32.INC} changed to {$I GR32.inc}
GR32_Containers:
uses
{$IFDEF FPC}
{$IFDEF Windows}
Windows,
{$ENDIF}
{$ELSE}changed to
uses
{$IFDEF FPC}
{$IFDEF Windows}
Windows,
{$ELSE}
LCLIntf,
{$ENDIF}
{$ELSE}otherwise PRect was not found.
Hello,
I prefer the mailling list.
And thanks, I will commit your improvements as soon as I regain commit access. I had it on their old repository, but recently they moved to SVN.
I will also implement a Qt Backend for GR32.
As far as I have more precise infos I will let you know. Would you prefer private mail?…
Hi
This should work always:
{$IFDEF FPC}
LCLIntf,
{$ELSE}Regards,
Juha
Hello,
I made all necessary fixes to compile in svn Graphics32. Please try again.
I didn't use LCLIntf but rather Types.
About the Unit not found thing, are you using the Lazarus package for Graphics32?
I would recommend using it instead of adding the units to your PATH
Yes, I use the package. Nothing added to PATH.
Btw, I have the same problems on Win and Mac, and also with Laz 0.9.28 and 0.9.29.
About the Unit not found thing, are you using the Lazarus package for Graphics32? I would…
About the Unit not found thing, are you using the Lazarus package for Graphics32? I would recommend using it instead of adding the units to your PAT
I explain in detail, what I do. Maybe this is already wrong. I open GR32_L.lpk and compile it. After that I open G32_DSGN_L.lpk and install it.
Is that the right way?
How can I completely uninstall a package from Lazarus?
Hello,
I took a look at the file that you sent and it has the wrong options. The option -va shows the searching of units, you used another option which just shows the IFDEFs...
Anyway, one possible cause is that you added the GR32 path to your Compiler Options search path. Is it so, or is it clean? Do you have old .ppu, .o files or else another unit called GR32?
I was having this problem with lNet, because I had my own unit called OpenSSL which conflicts with the one in FPC. (It's the same unit, but I use a better one and I am still testing it before commiting).
Maybe your problem is one of those...
Yes, that's the right way.
How can I completely uninstall a package from Lazarus?
Menu Packages --> Configure Installed Packages
Ah, for sending large amounts of text, which the mailling list will refuse, you can use the pastebin website. Just google for it and then send only the link to the text.
I took a look at the file that you sent and it has the wrong options. The option -va…
I did not add anything to something. And I have no other units with the same name. I get those errors after clean install of Lazarus and GR32, even the OS was clean.
You want a -va message file?
Menu Packages --> Configure Installed Package
Yes, but then Lazarus still knows that there is that package, though uninstalled. I meant, is there an XML file where Laz keeps tab on them?
Zitat von CA Gorski :
Yes.
> Menu Packages --> Configure Installed Package Yes, but then Lazarus still knows that there is that package, though uninstalled. I meant, is there an XML file where Laz keeps tab on them?
Yes, your project. See view / project inspector.
You can see the what packages do to your project in the "inherited" page of the compiler options.
Mattias