Recent

Author Topic: Will pay for a solution  (Read 1867 times)

user5

  • Sr. Member
  • ****
  • Posts: 386
Will pay for a solution
« on: June 01, 2025, 01:38:16 am »
    I have a Lazarus 1.0.10 program that I would like to work on in Lazarus 2.2.6 and it loads okay but when I try to compile
or build it then I always get the error message shown in the attached picture. If anyone can solve this for me then I would be
glad to pay for it though perhaps there is no solution. Thanks.

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #1 on: June 01, 2025, 01:43:32 am »
    Well, my attached picture didn't appear with the post so I'm trying again with a different format. If this fails then I'll try to send a smaller size picture.

srvaldez

  • Full Member
  • ***
  • Posts: 130
Re: Will pay for a solution
« Reply #2 on: June 01, 2025, 02:46:32 am »
it seems to me that the compiler is suggesting converting some variables to Int64 to prevent overflow

paweld

  • Hero Member
  • *****
  • Posts: 1419
Re: Will pay for a solution
« Reply #3 on: June 01, 2025, 06:43:56 am »
Add LazUtilsStrConsts unit to uses section.
Best regards / Pozdrawiam
paweld

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11303
  • Debugger - SynEdit - and more
    • wiki
Re: Will pay for a solution
« Reply #4 on: June 01, 2025, 08:58:18 am »
The Error is shown in a LazUtils  unit. Which normally compiles.

I suspect that the installation is broken.

When you upgraded, did you uninstall the old first? That may be needed.




2 Options.

1) Try menu: Tools > Configure build lazarus
selecte "clean all" then "build"

2) Uninstall, or delete the directory, the install again

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #5 on: June 02, 2025, 12:54:17 am »
I have never installed Lazarus without first removing any existing version.
    I don't know what you mean when you say that the installer is broken. I'm using the same new Lazarus version
that everyone uses and it works fine with all my other programs so I don't see how the installation could be broken.
    I went to the Tools menu and did what was suggested but that didn't work. I've installed and uninstalled many
times and I see no point in doing that again.
    The program builds fine on a 32-bit computer using the old Lazarus version. The build fails when I try to build it
on a 64-bit machine using a new 32/64 Lazarus version.
    I added LazUtilsStrConsts to the uses section but no luck.
    Does UtF8 have anything to do with LazUTF8, which is in the uses section?
    Maybe the person who wrote that winlazfileutils.inc code could help me.
    The reason I'm concerned and am willing to gladly pay for a solution is because the computer which runs the early
Lazarus version is very old and it won't last forever.
    Thanks.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11303
  • Debugger - SynEdit - and more
    • wiki
Re: Will pay for a solution
« Reply #6 on: June 02, 2025, 01:37:22 am »
I have never installed Lazarus without first removing any existing version.
Ok, good. I didn't know.

Quote
    I don't know what you mean when you say that the installer is broken. I'm using the same new Lazarus version
that everyone uses and it works fine with all my other programs so I don't see how the installation could be broken.

If you had just installed without uninstalling, then that could have created a mix of old and new, and that mix would not work.


Quote
    I added LazUtilsStrConsts to the uses section but no luck.

Now there is something unexpected.

I just looked at a 2.2.6 install (as well as a 4.0 install).

The unit LazFileUtils (which contains GetAppConfigDirUTF8 ) already has LazUtilsStrConsts in its uses clause.
So if you added it, then it should be there twice, and that would give an error.

So, then did you somehow got a different version of that file?

To be sure (just a habit, to check the obvious too): The file that you added it to is "LazFileUtils" ?
You did not include
  {$I lazfileutils.inc}
in some other unit? In some unit of your own?


Quote
    Does UtF8 have anything to do with LazUTF8, which is in the uses section?
LazUtf8 contains some helper function to deal with Utf8 encoded unicode text.

The function GetAppConfigDirUTF8 returns the directory in utf8 encoding. (translated from the unicode utf16 wide string that Windows itself provides)

Windows can handle filenames either as Unicode (widestring) or Ansi (local encoding, limited to chars in the local encoding).

Lazarus provides access to the Widestring name, but re-encoded as utf8.

Quote
    Maybe the person who wrote that winlazfileutils.inc code could help me.
    The reason I'm concerned and am willing to gladly pay for a solution is because the computer which runs the early
Lazarus version is very old and it won't last forever.

All fine and good. I offer you the bits of knowledge I have for free. And I guess some other will do too.

If someone else can do better and wants to charge for it... That is between you and them.

I did not write that unit. But I do build the windows installer. So I have some background.

On the other hand, based on the info from your description, I have not enough details to
- know what it is
- know if I can find out

So best I can offer right now, is to ask question, hoping some answer will bring forward some detail that gives me a clue.




So
- other projects work
- Configure build Lazarus "did not work"
  => it gave you an error?
  => it did somethinge, without error / but did not fix the issue?


My "unit LazUtilsStrConsts;"
c:\lazarus/components\lazutils\lazutilsstrconsts.pas
has the declaration:
  lrsUnableToCreateConfigDirectoryS = 'Unable to create config directory "%s"';

On line 37.

Does yours too?




Rather unlikely, but by any chance in your project folder or any subfolder of you project (not c:\lazarus - but where your own code is) is there a file named lazutilsstrconsts.ppu ?

It should not be there.



Does your project cross compile (target a different OS, or bitness, or CPU )?

I just wonder, the package LazUtils is precompiled. Normally if you build your project this package should not need to be compiled.
But if you get compilation errors in it, then it did get compiled...





user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #7 on: June 02, 2025, 08:13:19 pm »
Gosh, thank you so much for making the effort to try and help me. I just don't understand why the program compiles on
an old Lazarus version but not a new one. Is that some kind of clue?
    Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils) but I took it out.
    I do not have {$I lazfileutils.inc} anywhere in my program.
    Configure build Lazarus processed fine but it did not fix the problem. I did not get an error message.
    Yes, line 37 of lazutilsstrconsts.pas has the same statement you mentioned.
    I searched all files for lazutilsstrconsts.ppu but did not find it.
    I don't know if the following info is relevant, but I will mention it just in case: I think that somewhere in my code is a
dangling procedure that was not correctly removed or made to be inert because I made a mistake. For example, whenever
I use the Menu Editor to create a new menu item, the Menu Editor will say something like "New Item100" which is
supposed to create a new, unused menu item. However, when I double click on that item the click always leads to an existing
menu item that already contains code. Thus, I have to create two menu items, deleting the first item and then using the
second one, if that makes any sense. It's hard to explain.
    The main form of my program can be built and compiled but it cannot be run from the IDE because some other small program launches it.
    The main form is huge and the overall program including sub programs has around a million lines of code, no exaggeration, so there is
no way that I can simply transfer the code piece by piece into my other Lazarus compiler.

    The main form contains my earliest work and some of it is not very elegant.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11303
  • Debugger - SynEdit - and more
    • wiki
Re: Will pay for a solution
« Reply #8 on: June 02, 2025, 08:51:02 pm »
Quote
Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils)

Ah, yes. That someone made it ambiguous.  Probably meant "insert to the uses of the unit that fails to compile".
According to your image that is  C:\lazarus\components\lazutils\winlazfileutils.inc (as shown on the status bar of the editor). That inc file is part of the unit C:\lazarus\components\lazutils\lazfileutils.pas

And that unit
1) Should already have that statement
2) Should not fail to compile
3) Should not even get compiled, because it is pre-compiled



Of course you may have changed settings for the project => old project, over time some settings will be made...

Lets gather some more details.

A) If you can (if not too big, and not private) attach your projects lpi file (that is an XML file that contains settings you made / it also contain a list of units, so if that is private then don't)
You can also  send per PM or mail lazarus () mfriebe _ de where () = @ and _ = .

If you can't or wont sent that file make a screenshot of
Menu: Project > Project Options => Page: Compiler Options > Paths


B) Copy and paste the content of
Menu: View > Ide Internals > What needs building


C) Compile the project to get the error.
Then right click the error message and select
Copy > Copy All/Original messages to clipboard

zip and attach (or send by pm/mail)

If it is to big, then sent paste it in an editor on your computer, and select the last 200 lines and send those.






Also try cleaning your project dir and build....
(I don't expect this to be the problem, but better try one thing to much than skipping something that may have had a chance to help)

This is assuming your project dir is separate from c:\lazarus

To do this
- backup your project
- using the windows explore find in your project dir (including all subfolders) any file with the extension .ppu => delete those files
- any file with the extension.o => delete too
- then compile again.



paweld

  • Hero Member
  • *****
  • Posts: 1419
Re: Will pay for a solution
« Reply #9 on: June 03, 2025, 06:51:00 am »
Quote from: Martin_fr
Quote
Someone suggested that I add LazUtilsStrConsts to the uses clause of my main unit (not LazFileUtils)

Ah, yes. That someone made it ambiguous.  Probably meant "insert to the uses of the unit that fails to compile".
That's exactly what I meant. Although I thought the errors were related to one of the project units.

I didn't notice:
Quote from: Martin_fr
According to your image that is  C:\lazarus\components\lazutils\winlazfileutils.inc (as shown on the status bar of the editor).
Best regards / Pozdrawiam
paweld

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #10 on: June 03, 2025, 11:36:15 pm »
    I am considering everything that you said. Some of it may be over my head.
    I am the author of a program called VirtualU, a picture and video editor. I gave the copyright to one of my
nephews but I talked to him and he says that it's okay to donate the program to the Lazarus Forum when I can
no longer work on it. I don't want it to be open source so that the Forum will have exclusive rights to it if they
want it. The owner has rights too.
    You don't need to say anything and I would prefer it that way, except for my compiling problem. It's just
something that will eventually happen.
    I will post a message shortly in the third-party section.
    I'm swamped with work right now but I will think about your comments.
    Thanks.

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #11 on: June 05, 2025, 08:56:46 pm »
    I deleted all files with the .o and .ppu extensions but the program still gets the same error. All those files were
in lib\i386-win32. As a test I also removed all references to Utf8 but that didn't work either.
    To try and fix this problem I once installed a number of Lazarus versions that were newer than the problem
version but older than the newest version in an attempt to at least get the program to compile is some other version.
    I may try that again.
    Thanks for your efforts.

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #12 on: June 09, 2025, 12:34:19 am »
    This is the Lazarus jobs section and I've seen folks seeking work.
    Well, here it is: I'm offering real money to hire anyone or a team to solve the problem discussed in this thread for
whatever fee you want up to a point.
    I'm stuck and there is nothing else I can do. Are you going to tell me that no one at Lazarus can provide hope for a cure?
    By the way, this is just a humble idea and you may well not agree for what may be very good reasons, but I think
it would be nice if the Forum could be a place where folks who know nothing about coding could download useful programs written by its members.
    I don't know if you've noticed lately but recently I have found that there aren't as many free online video services as there used to be.
    The whole goal here is to be a player, to be involved and to matter.
    However you feel, remember that I'm a long supporter (and recipient) of this forum and now I'm willing to pay for it.
    I will have to get a new computer to install the middle version Lazarus program so that I can test it with the problem lpi.
    There is no way in heck that I would ever uninstall the new version that I'm using to write sub programs.
    Meanwhile I will continue coding. I can't stop.
    Anyway, thanks.

user5

  • Sr. Member
  • ****
  • Posts: 386
Re: Will pay for a solution
« Reply #13 on: June 11, 2025, 12:02:13 am »
    Say, how about $300? Would that be enough? This is so serious for me.
    I would be happy to pay someone personally or donate to the forum.
    I would at least like to find out why this problem happens, much less the solution.
    For example, a person might like to find out why his program crashes and the first part of solving
the problem would be for the person to hear something like "Well, this happened because the
boundaries of the array were exceeded."
    The person would then be able to fix the problem on his own.
    Thank you for your courtesy. I love this forum.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11303
  • Debugger - SynEdit - and more
    • wiki
Re: Will pay for a solution
« Reply #14 on: June 11, 2025, 01:02:47 am »
Just a note here, there are 2 (likely) scenarios. (and who knows how many that I have not thought of...)

1) The issue is in your project.
In that case, you probably sent the project to the other person (agreeing with them on terms of privacy).
They will sent it back in
a) compilable form
   (a) for this an interested party may want to know, if there are 3rd party modules involved?
   Any packages you downloaded and use? Any databases that need to be present to compile (or other libraries that get linked)?
b) working (as in fix any runtime issues / crashes / incorrect output / ...)
    (b) could discourage others as the amount of work can't be easily estimated.

2) The issue is in your overall setup
That could be your lazarus install, but also other apps installed on your system, that interfere...
If it is your setup, then you will likely have to grant the other party access via teamviewer or some other remote access.




 

TinyPortal © 2005-2018