Villavu / Simba

Simba is a program used to repeat certain (complicated) tasks. Typically these tasks involve using the mouse and keyboard. Simba is programmable, which means you can design your own logic and steps that Simba will follow, based upon certain input such as colors on the screen.
http://villavu.github.io/Simba/
GNU General Public License v3.0
220 stars 76 forks source link

Compile error on Ubuntu Linux #216

Closed JacobHacker closed 8 years ago

JacobHacker commented 11 years ago

In mmlpsthread:

procedure lp_CurrThreadID(Params: PParamArray; Result: Pointer); lape_extdecl
begin
{$IFDEF WINDOWS}
  PPtrUInt(Result)^ := GetCurrentThreadID();
{$ELSE}
  {$IFDEF LINUX}
  PPtrUInt(Result)^ := TThreadID(pthread_self);
  {$ELSE}
  PPtrUInt(Result)^ := GetThreadID();
  {$ENDIF}
{$ENDIF}
end;     

Specifically this line:

PPtrUInt(Result)^ := TThreadID(pthread_self);

~/src/Simba/Units/MMLAddon/mmlpsthread.pas(1302,46) Error: Identifier not found "pthread_self"

Thoughts?

I still don't realize how Gentoo will compile it easily, and Ubuntu is taking forever to get working.

JohnPeel commented 11 years ago

Sorry, I wrote that from something I seen on the FreePascal wiki, it seems to be incorrect.

MerlijnWajer has fixed it.

Can you try now?

JacobHacker commented 11 years ago

That seems to have fixed, many thanks :)

Although I am now getting this error, perhaps I should create another issue? Everything compiles, and when I run it it creates this error log:

Program exception! 
Stacktrace:

Exception class: EAccessViolation
Message: Access violation
  $080603A1
  $0833FB13  TPSTHREAD__GETEXPORTEDMETHODS,  line 615 of ~/src/Simba/Units/MMLAddon/PSInc/psexportedmethods.inc
  $0809BFAC  TSIMBAFORM__MENUITEMFILLFUNCTIONLISTCLICK,  line 3122 of simbaunit.pas
  $0809DC13  TSIMBAFORM__FUNCTIONLISTSHOWN,  line 3701 of simbaunit.pas
  $08097949  TSIMBAFORM__LOADFORMSETTINGS,  line 1743 of simbaunit.pas
  $0809B393  TSIMBAFORM__FORMCREATE,  line 2851 of simbaunit.pas
  $08082F3E  TCUSTOMFORM__DOCREATE,  line 954 of ./include/customform.inc
  $08081408  TCUSTOMFORM__AFTERCONSTRUCTION,  line 155 of ./include/customform.inc
  $080883F9  TFORM__CREATE,  line 3066 of ./include/customform.inc
  $08091074  TAPPLICATION__CREATEFORM,  line 2166 of ./include/application.inc
Simba Version: 1000
JohnPeel commented 11 years ago

Are you sure you pulled everything? no issues?

You shouldn't be getting that issue, I've fixed it.

JacobHacker commented 11 years ago

Deleting git folder and re-pulling

JacobHacker commented 11 years ago

After compilation I get this:

Setting ScriptManager/URL to http://127.0.0.1/
Setting ScriptManager/Path to Scripts/ScriptStorage.xml
Setting ScriptManager/File to ScriptManager.xml
Setting ScriptManager/FirstRun to True
Setting LastConfig/MainForm/Position to 
Setting Settings/MainForm/NormalSize to 739:555
Setting LastConfig/MainForm/State to normal
Setting LastConfig/MainForm/FunctionListShown to True
Setting LastConfig/MainForm/FunctionListShown to False
*** glibc detected *** /home/jacob/src/Simba/Simba: corrupted double-linked list: 0x08e426c8 ***

Then when I try to run Simba I get this (in an error log):

Program exception! 
Stacktrace:

Exception class: EAccessViolation
Message: Access violation
  $080603A1
  $0833FB13  TPSTHREAD__GETEXPORTEDMETHODS,  line 615 of /home/jacob/src/Simba/Units/MMLAddon/PSInc/psexportedmethods.inc
  $0809BFAC  TSIMBAFORM__MENUITEMFILLFUNCTIONLISTCLICK,  line 3122 of simbaunit.pas
  $0809DC13  TSIMBAFORM__FUNCTIONLISTSHOWN,  line 3701 of simbaunit.pas
  $08097949  TSIMBAFORM__LOADFORMSETTINGS,  line 1743 of simbaunit.pas
  $0809B393  TSIMBAFORM__FORMCREATE,  line 2851 of simbaunit.pas
  $08082F3E  TCUSTOMFORM__DOCREATE,  line 954 of ./include/customform.inc
  $08081408  TCUSTOMFORM__AFTERCONSTRUCTION,  line 155 of ./include/customform.inc
  $080883F9  TFORM__CREATE,  line 3066 of ./include/customform.inc
  $08091074  TAPPLICATION__CREATEFORM,  line 2166 of ./include/application.inc
Simba Version: 1000
JohnPeel commented 11 years ago

You shouldn't be running simba on Linux with PascalScript selected.

Try Script->Interpreter->Lape, then see if you get the same issue with TLPThread_GetExportedMethods()

JacobHacker commented 11 years ago

The error is as soon as I start it, so no way to select interpreter. (Does it use PascalScript in startup?)

JohnPeel commented 11 years ago

Yes PS is selected by default but I see no reason why you should be getting this issue on startup.

I'll look into it in a minute, gotta get my Mint virtual machine out.

JacobHacker commented 11 years ago

You can also boot from jump drive :)

MerlijnWajer commented 11 years ago

I also ran into this exact issue when I tried to compile Simba on ARM. Didn't see it in my x86 install though. Maybe a specific FPC or Lazarus version issue. What versions are you using?

JacobHacker commented 11 years ago

The github version (whichever branch is default)

MerlijnWajer commented 11 years ago

I was talking about FPC and Lazarus versions. Any clue?

MerlijnWajer commented 9 years ago

Is this still an issue? I presume it is not.

JohnPeel commented 9 years ago

No clue, my builds (x64, x86, ARM) are all fine, but it might be a laz/fpc version issue. We should set a specific version and force all devs/users (that compile) to use it

JohnPeel commented 8 years ago

I'm going to assume the lack of updates means you've figured it out. We also cannot reproduce the issue.