Recent

Author Topic: Build failure  (Read 2894 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3407
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Build failure
« Reply #15 on: June 16, 2025, 03:39:38 am »
....
    I couldn't copy and paste the compiler messages but I attached a screenshot of them. Thanks again.

OK, thats pretty clear, even to a non-windows user like me. Your code mentions an series of identifiers, such as "lrsUnableToCreateConfigDirectoryS" that are expected to contain the text of an error message. It's possible all that text is in a separate file (thats how  do it) and that separate file is not 'findable' or is not, one way or another, included in the project.

You will have to work out where those identifiers were defined and, possibly, add the name of the file containing them to your "uses" line.  As a temporary measure, you could, perhaps, replace each incidence with an appropriate bit of text, 'some error happened here' (including the single inverted commas). Doing so will prevent the error message from being translated into other languages - that may or may not be important to you. Better, IMHO, to find the original definitions.

You should be able to do a text search of your directories looking for that identifier name, but need a Windows user to tell you how.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Build failure
« Reply #16 on: June 16, 2025, 05:11:21 am »
@dbannon, @dseligo, please confirm that you have seen my message above.

I have already provided a direct link to the message with the author's screenshot, which indicates a compilation error. Many of your questions have already been asked by Martin in this thread, and you can read the answers.

@dseligo, I have already attached the same project for testing. I hope the author will check at least one of them ))

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Build failure
« Reply #17 on: June 16, 2025, 05:22:03 am »
    I think that my recent downloads have been from the Lazarus site. On the old machine I installed the old Lazarus version
in the Program Files section, which I now know is slightly a no no because I've read that it can cause conflict with Utf8 but
my newest Lazarus compiler is not in the Program section.

Installing in "Program Files" is bad not only because of possible access rights issues, but also because of spaces in the name. Make sure you install Lazarus in a folder whose path does not contain spaces.

dbannon

  • Hero Member
  • *****
  • Posts: 3407
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Build failure
« Reply #18 on: June 16, 2025, 07:07:35 am »
@dbannon, @dseligo, please confirm that you have seen my message above.
No, I had not. But we arrived at the same conclusion when a new screen shot was posted in this thread !

I threw my hat into the ring because it was clear some people, not the least, the OP, was still thinking about a UTF8 issue. I have directed the OP's gaze towards the actual error message, looking at the other thread, the solution was presented by paweld "Add LazUtilsStrConsts unit to uses section".

(My advice, effectively, "look for your project's i18n file" was inappropriate because those are Lazarus constants, not OP's project constants. Sigh ....

user5, adding lazutilsstrconsts to the uses line of the file that does not compile should fix it. If not, cleaning out the old build files (Run->Clean_up_and_Build) almost certainly will (as suggested by n7800 in the other thread). And a side note, starting a new thread on the same topic is probably not that good of an idea. Few people read all posts going past !

Working with code as old as you are, you sure will run into more issues. And people here will sure want to help !

Once you have it working in Lazarus 2, are you jumping to 4.0 ?  Makes sense ....
Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 17388
  • Ceterum censeo Trump esse delendam
Re: Build failure
« Reply #19 on: June 16, 2025, 09:02:21 am »
    I think that my recent downloads have been from the Lazarus site. On the old machine I installed the old Lazarus version
in the Program Files section, which I now know is slightly a no no because I've read that it can cause conflict with Utf8 but
my newest Lazarus compiler is not in the Program section.

Installing in "Program Files" is bad not only because of possible access rights issues, but also because of spaces in the name. Make sure you install Lazarus in a folder whose path does not contain spaces.
That is about the baddest advice given in the last month.
You should always follow the guide lines from the OS you are working with:
- "Program files"
or for 32 bit:
- "Program files (x86)"

Anything else, apart from how fpcupdeluxe installs multiple versions, is really bad. And even that is debatable ond only for  power users.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

VisualLab

  • Hero Member
  • *****
  • Posts: 686
Re: Build failure
« Reply #20 on: June 16, 2025, 09:30:58 am »
    I think that my recent downloads have been from the Lazarus site. On the old machine I installed the old Lazarus version
in the Program Files section, which I now know is slightly a no no because I've read that it can cause conflict with Utf8 but
my newest Lazarus compiler is not in the Program section.

Installing in "Program Files" is bad not only because of possible access rights issues, but also because of spaces in the name. Make sure you install Lazarus in a folder whose path does not contain spaces.
That is about the baddest advice given in the last month.
You should always follow the guide lines from the OS you are working with:
- "Program files"
or for 32 bit:
- "Program files (x86)"

Anything else, apart from how fpcupdeluxe installs multiple versions, is really bad. And even that is debatable ond only for  power users.

Theoretically, it should be like that. In practice, in the past, trying to install Lazarus in Windows in one of the directories "C:\Program Files" caused various perturbations and problems. Since then, I always install Lazarus directly to "C:". Thanks to that, I have no problems.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11443
  • Debugger - SynEdit - and more
    • wiki
Re: Build failure
« Reply #21 on: June 16, 2025, 10:23:24 am »
    I couldn't copy and paste the compiler messages but I attached a screenshot of them. Thanks again.

The image shows that the error happens while building the project. But the file "looks like" a file from the LCL (lazarus).

That does indicate, that your installation could (as in "may possible") be ok. But your Project may either
1) have a file of the same name
2) may have settings in "project options" > compiler > path


1)

Check if you have a file named winlazfileutils.inc anywhere in your project.

Don't check the file that opens when you click the message. => If there are 2 files of the same name, then the IDE may show you the wrong one.

If you do, then please report. And continue below (step 2)
(removing it likely will give you a new error.)


2)
Open "search in files" and search all files in your project (and or project directory) for the word
   winlazfileutils

If it is found, please report
- where it is found (unit name)
- a few lines of code surrounding it



dseligo

  • Hero Member
  • *****
  • Posts: 1532
Re: Build failure
« Reply #22 on: June 16, 2025, 11:02:13 am »
@dbannon, @dseligo, please confirm that you have seen my message above.

I have already provided a direct link to the message with the author's screenshot, which indicates a compilation error. Many of your questions have already been asked by Martin in this thread, and you can read the answers.

@dseligo, I have already attached the same project for testing. I hope the author will check at least one of them ))

Sorry, I missed that.
But I can't see that he tried this. IMO, it will show if the problem is in the Lazarus' installation or his project. And in his last post, Martin_fr gave hints what could be problem in his project.

user5

  • Sr. Member
  • ****
  • Posts: 414
Re: Build failure
« Reply #23 on: June 16, 2025, 11:16:05 am »
   I tried to install various old and new Lazarus versions. The ones that offered a secondary installation did install but showed error
messages when I tried to compile the old program. The error messages were sometimes similar to the Utf8 errors but not necessarily
the same message. Several wouldn't compile because the compiler couldn't find Interfaces which is in the old program's uses section.
    The ones that did not offer a secondary installation failed to install at all, probably due to a conflict with the existing Lazarus 2.2.6.0
version which I don't want to uninstall. Installation takes a while since I have to load the packages EpikTimer, MPlayer and ACS.
    I loaded the attached project on Lazarus 2.2.6.0 and it ran fine.
    When you say "comment calls", do you mean to make a function be inert so that it's not executed? I did try to bypass some code
but it didn't work out.

user5

  • Sr. Member
  • ****
  • Posts: 414
Re: Build failure
« Reply #24 on: June 16, 2025, 11:17:08 am »
  I tried to install various old and new Lazarus versions. The ones that offered a secondary installation did install but showed error
messages when I tried to compile the old program. The error messages were sometimes similar to the Utf8 errors but not necessarily
the same message. Several wouldn't compile because the compiler couldn't find Interfaces which is in the old program's uses section.
    The ones that did not offer a secondary installation failed to install at all, probably due to a conflict with the existing Lazarus 2.2.6.0
version which I don't want to uninstall. Installation takes a while since I have to load the packages EpikTimer, MPlayer and ACS.
    I loaded the attached project on Lazarus 2.2.6.0 and it ran fine.
    When you say "comment calls", do you mean to make a function be inert so that it's not executed? I did try to bypass some code
but it didn't work out.

wp

  • Hero Member
  • *****
  • Posts: 12908
Re: Build failure
« Reply #25 on: June 16, 2025, 11:19:15 am »
    I loaded the attached project on Lazarus 2.2.6.0 and it ran fine.
Attached project? There is no attachment...

user5

  • Sr. Member
  • ****
  • Posts: 414
Re: Build failure
« Reply #26 on: June 16, 2025, 11:21:53 am »
  I tried to install various old and new Lazarus versions. The ones that offered a secondary installation did install but showed error
messages when I tried to compile the old program. The error messages were sometimes similar to the Utf8 errors but not necessarily
the same message. Several wouldn't compile because the compiler couldn't find Interfaces which is in the old program's uses section.
    The ones that did not offer a secondary installation failed to install at all, probably due to a conflict with the existing Lazarus 2.2.6.0
version which I don't want to uninstall. Installation takes a while since I have to load the packages EpikTimer, MPlayer and ACS.
    I loaded the attached project on Lazarus 2.2.6.0 and it ran fine.
    When you say "comment calls", do you mean to make a function be inert so that it's not executed? I did try to bypass some code
but it didn't work out.

PS: I tried to replay several times but the message above didn't appear where I thought it was supposed to appear.

user5

  • Sr. Member
  • ****
  • Posts: 414
Re: Build failure
« Reply #27 on: June 16, 2025, 11:36:56 am »
    I added "lazutilsstrconsts" to the uses section and selected "Run\Clean up and build" but I got the same Utf8 error message.
    I'm pondering your responses.
    Sorry about my repeated posts.

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Build failure
« Reply #28 on: June 16, 2025, 07:12:16 pm »
    I think that my recent downloads have been from the Lazarus site. On the old machine I installed the old Lazarus version
in the Program Files section, which I now know is slightly a no no because I've read that it can cause conflict with Utf8 but
my newest Lazarus compiler is not in the Program section.

Installing in "Program Files" is bad not only because of possible access rights issues, but also because of spaces in the name. Make sure you install Lazarus in a folder whose path does not contain spaces.
That is about the baddest advice given in the last month.
You should always follow the guide lines from the OS you are working with:
- "Program files"
or for 32 bit:
- "Program files (x86)"

Anything else, apart from how fpcupdeluxe installs multiple versions, is really bad. And even that is debatable ond only for  power users.

Thanks for your rating, but the path "C:\lazarus" is suggested by default by the installer. Moreover, when specifying a path with a space, it shows an error (tested 2.2.6 and 4.0).

The details of this are listed on the bug tracker in issue #9950. Note that it is closed, but this is only for the new version.

I have hardly used FpcUpDeluxe, but when I run it, I also see the path "C:\fpcupdeluxe".

So I don't understand how you and @user5 could install Lazarus in "Program Files"...

n7800

  • Sr. Member
  • ****
  • Posts: 394
Re: Build failure
« Reply #29 on: June 16, 2025, 07:35:41 pm »
    I loaded the attached project on Lazarus 2.2.6.0 and it ran fine.
Attached project? There is no attachment...

Apparently he means a test project, mine or @dseligo's (see above messages).

@user5, just to make sure what you see when you run them?

 

TinyPortal © 2005-2018