Lazarus
Programming => Operating Systems => macOS / Mac OS X => Topic started by: Bobarkinator on May 11, 2012, 07:03:28 pm
-
Hi there, I'm developing an application using objective pascal in Lazarus on 10.7. Having some problems. When I start a new project I'm able to use MacOSAll and CocoaAll just fine, without any errors. However when I try to include CocoaAll in my existing project and go to compile I get the error "Compiling CFURL, checksum changed for file", then I get the error "Fatal: Cannot find unit CFURL used by IconsCore". Has anyone else run into the problem before and knows a way to fix it? Or has any ideas that I could try?
-
Such an error usually is caused by PPU version mix. In your case, while compiling CFURL, which uses another file xxx (Compiling CFURL, checksum changed for file xxx) the compiler finds that xxx either was compiled with different configuration/compiler version or the unit itself was changed.
Another possibility is that because (at least) one of your project's unit has the same name as one of the RTL/FCL/LCL/3rd party packages unit whose path is included in search path. To test, try running compiler options->test, a warning would be shown like: ppu existed twice bla bla bla...
-
I ran the test, found several files that it found 2 of. Should I delete the conflicting files or just take that line out of my compiling options?
-
If they're part of your projects, rename. Otherwise, recompile with -vt and post some of the latest lines (that includes your "recompiling CFURL bla bla bla").
-
Well these are the only two messages shown when it's finished trying to compile
"Recompiling CFURL, checksum changed for files"
"/Users/williamcarey/Desktop/Simba/Units/MMLCore/os_mac.pas(1,1) Fatal: Can't find unit CFURL used by IconsCore"
Right before that however it stated it was searching for CFURL and it couldn't find it. So that could be my problem?
-
"Recompiling CFURL, checksum changed for files"
"/Users/williamcarey/Desktop/Simba/Units/MMLCore/os_mac.pas(1,1) Fatal: Can't find unit CFURL used by IconsCore"
If you compile with -vt, the compiler will show which files need to be recompiled. The "Can't find unit" error is due to the compiler being failed to find source code of the problematic unit to be recompiled.
-
I'm sorry, but that's not what I'm seeing. I've put the "-vt" switch in the custom options text box for my project options, but I'm not seeing anything telling me what needs to be recompiled. Just those 2 errors I posted before.
-
Right click messages window->copy all and hidden messages
-
Ok I did that, I got all the messages. I looked through it. When it gets to CFURL, it finds the ppu, then it starts looking for the pp, p, and pas files and it can't find them then it throws the error.
-
Scan through the lines after
Recompiling CFURL, checksum changed for file
see which file the compiler is trying to recompile.
-
It doesn't mention which one it is. It goes directly from
Recompiling CFURL, checksum changed for files
to
/Users/williamcarey/Desktop/Simba/Units/MMLCore/os_mac.pas(1,1) Fatal: Can't find unit CFURL used by IconsCore
-
It doesn't mention which one it is
Then I can help no further. I don't know what's wrong with your installation, but the error message should be something like:
Recompiling Graphics, checksum changed for FPReadJPEG fpreadjpeg.pas(1, 1) Fatal: Can't find unit Graphics used by ImgList
In this case, it's clear that upon compiling Graphics, which uses FPReadJPEG, the compiler encounter FPReagJPEG has changed somehow and try to recompile it. However, since the compiler can't find the source, FPReadJPEG can't be recompiled, thus implying Graphics can't be recompiled as well. Causing the compilation to be aborted.
-
Would it help to remove my FPC installation and try reinstalling it?
-
My stupidity (facepalm) (faceslap), the problematic unit is "files". Do you have a unit named files.pas / files.pp / files.whatever?
-
Aha, yes I do have a files.pas in my project. I need to rename that?
-
Aha, yes I do have a files.pas in my project. I need to rename that?
Please do, use the IDE File->Save As to automatically update the references in your project.
-
Hmmm, I've done that. I'm still getting the same error.
-
Delete the corresponding .o and .ppu as well.
-
Well after taking care of that and then a couple more conflicts I got it to compile successfully. Thank you very much for you help sir!