Recent

Author Topic: FPC 3.2.x series branched, trunk update to 3.3.1  (Read 66061 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6592
    • wiki
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #195 on: May 20, 2020, 01:54:24 pm »
If Lazarus would provide more information when trying to run a program on Linux, I would provide more information. But Lazarus did not provide any information, only: "Error: RunError (211)".
What other information can I attach?
https://www.freepascal.org/docs-html/user/userap4.html
 "Call to abstract method"

Something calls none existing code.

What does the stack window show?

Quote
it does not compile on Linux
Not compile? or not run? or even it fails when run?

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #196 on: May 20, 2020, 07:17:22 pm »
Не компилируется и не создаёт файл.
Not compile and not create.


Я не могу даже отладку запустить, чтоб узнать в чём дело.
translate:
I can’t even start debugging to find out what’s the matter.

https://www.freepascal.org/docs-html/user/userap4.html
 "Call to abstract method"

благодарю, но к сожалению это не приближает к ответу. Всё равно в "угадайку" надо играть, чтоб понять в чём причина.

translate:
Thank you, but unfortunately this does not bring us closer to the answer. All the same, you must play the "guessing game" in order to understand the reason.

PascalDragon

  • Hero Member
  • *****
  • Posts: 2093
  • Compiler Developer
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #197 on: May 21, 2020, 02:39:05 pm »
I've tried to reproduce your problem on both x86_64-linux as well as x86_64-win64 with both FPC 3.0.4 and FPC 3.3.1 as well as Lazarus 2.0.6 and 2.1 however the ZenGL demos work without any problem for me. Can you try whether the demos work for you as well? (you'll need to copy the ZenGL library to the output directory of the demos to use it)

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #198 on: May 22, 2020, 10:27:01 am »
У меня демонстрационные примеры так же не запускаются. Проблемы я не нашёл.
Запускаются при Lazarus 2.0.0 + FPC 3.0.4.
Используя FPC 3.3.1 появляются ошибки, проект может скомпилироваться но не запускается, в Lazarus выдаёт ошибку.

Благодарю за то что проверили работоспособность! Извиняюсь за ваше потраченное время!

Буду искать проблемы у себя. Если выясню в чём дело отпишусь.

translate:
My demos also do not start. I did not find a problem.
Run with Lazarus 2.0.0 + FPC 3.0.4.
Using FPC 3.3.1 errors appear, the project may compile but does not start, it generates an error in Lazarus.

Thank you for checking the performance! I apologize for your time!

I will look for problems at home. If I find out what's the matter, unsubscribe.

forgot, Linux.
on Windows, this problem is solved
« Last Edit: May 22, 2020, 11:52:47 am by Seenkao »

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #199 on: July 14, 2020, 09:31:36 pm »
sorry for the long answer.

В общем проблема не совсем понятна. Если я использую Typhon или GetLazarus то проблема есть (но раньше не было), я видимо что-то установил, и после этого появились проблемы.
После установки стандартной версии Lazarus из Synaptic всё запустилось нормально.

Так же я не знаю, проблема это или нет, но очень не удобно держать несколько разных версий Lazarus для компилирование под разные среды. Под Windows (как и под Линукс)  я просто меняю компилятор, но если в Windows это не вызывает проблем, то под Linux это может вызвать разнообразные ошибки при смене компилятора.

Если это так и должно быть, тогда вопрос снимается.

Google translate: In general, the problem is not entirely clear. If I use Typhon or GetLazarus, then there is a problem (but it didn’t exist before), I apparently installed something, and then problems appeared.
After installing the standard version of Lazarus from Synaptic, everything started fine.

I also don’t know if this is a problem or not, but it’s very inconvenient to keep several different versions of Lazarus for compiling under different environments. Under Windows (as well as under Linux), I just change the compiler, but if it does not cause problems on Windows, then under Linux it can cause a variety of errors when changing the compiler.

If this is as it should be, then the question is removed.

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #200 on: August 11, 2020, 06:13:33 am »
When using native methods and critical sections, "cthreads" should be set at the very beginning (very first) module. Otherwise, a conflict arises, accompanied by (RunError 211).

in FPC 3.0.4 - it was not necessary.

PascalDragon

  • Hero Member
  • *****
  • Posts: 2093
  • Compiler Developer
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #201 on: August 11, 2020, 09:22:07 am »
When using native methods and critical sections, "cthreads" should be set at the very beginning (very first) module. Otherwise, a conflict arises, accompanied by (RunError 211).

in FPC 3.0.4 - it was not necessary.

What platform? Only on Windows it isn't necessary, but on *nix platforms it has always been necessary.

Seenkao

  • Jr. Member
  • **
  • Posts: 55
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #202 on: August 11, 2020, 05:08:27 pm »
What platform?

All unix.

but on *nix platforms it has always been necessary.

No, in FPC <= 3.0.4, there was no need to use it at the beginning (in the launched module), it was enough to indicate in the module which one it is using.

(Нет, в FPC <= 3.0.4 не было необходимости использовать в начале (в запускаемом модуле), достаточно было указать в модуле его используещего.)

my fault,
I'm sorry.
« Last Edit: August 11, 2020, 06:14:41 pm by Seenkao »

PascalDragon

  • Hero Member
  • *****
  • Posts: 2093
  • Compiler Developer
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #203 on: August 12, 2020, 09:26:12 am »
but on *nix platforms it has always been necessary.

No, in FPC <= 3.0.4, there was no need to use it at the beginning (in the launched module), it was enough to indicate in the module which one it is using.

That might have worked by accident, but it was always assumed that the cthreads unit is only used in the main project file and as "left-most" as possible, that is because the unit sets up a global thread manager. If you now use a different unit before that which creates a thread or critical section or event or whatever then this will fail. Maybe you had a unit that didn't create such a construct in 3.0.4, but it does now in 3.2.0.

It is documented here (and that has been there at least since it was imported into SVN 15 years ago):

Quote
For linux (and other Unixes), the C thread manager can be enabled by inserting the cthreads unit in the program’s unit clause. Without this, threading programs will give an error when started. It is imperative that the unit be inserted as early in the uses clause as possible.

 

TinyPortal © 2005-2018