Recent

Author Topic: Fpcupdeluxe  (Read 792671 times)

MiR

  • Full Member
  • ***
  • Posts: 246
Re: Fpcupdeluxe
« Reply #1740 on: December 10, 2020, 12:56:33 pm »
Starting both new builds via Finder still does not work, I still have to resort to Terminal to run fpcupdeluxe.

Also the ppca64 does not work, I had to replace it with a symlink to my own build.

But the rest is fixed, the rest worked like a charm....

One question: do you use xcrun to detect commandline tools as I wrote? Hardcoding it will not work for users that have full XCode install, for them the path is different (You can check in the 'building fpc for m1' Article mentioned above, there the path for XCode is used.)

Can you send me your steps for code-signing? Perhaps I do a lucky punch and find something.....

Thank you for your great tool,

Michael

One more thing: When you feel really bored, would it be possible to add an option to do a distclean after build of fpc and lazarus? That saves a little space and as I bought the mac with only 256GB of flash free memory fades away faster than snow in the sun....

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1741 on: December 10, 2020, 01:09:44 pm »
@MiR

Yes, xcrun is used to get the SDK path.

About codesigning and cross-building for arm64. Its not easy to cross towards this new target. Have a look here:
https://github.com/LongDirtyAnimAlf/ld64-msys
https://github.com/LongDirtyAnimAlf/libtapi-msys
I had to make and use the above two repo's to be able to compile Apple's clang12 together with libtapi, blocks, the custom linker LD64 and tools on Windows and Linux.
Inside the LD-repo there is this:
https://github.com/LongDirtyAnimAlf/ld64-msys/tree/master/ldid
Explain:
http://iphonedevwiki.net/index.php/Ldid
So, codesigning on a non-Darwin system will always be very tricky and 90% guaranteed NOT to work.
I do not have a developer-id, as being a Windows guy.

MiR

  • Full Member
  • ***
  • Posts: 246
Re: Fpcupdeluxe
« Reply #1742 on: December 10, 2020, 02:18:14 pm »
I may have found a partial solution:

codesign --force --deep -s - ppca64

makes the bootstrap compiler work for me, worst case fpcupdeluxe could do that step after downloading fpcbootstrap

codesign --force --deep -s - fpcupdeluxe-aarch64-darwin-cocoa.app

also works for your unsigned build, with your signed build I get an exception when starting but nevertheless the code also starts.

Question is now if it could be acceptable for you to run this codesign step from within a vm and, of course, if this adhoc signature works on all devices or only on the device where it was issued.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1743 on: December 10, 2020, 02:22:16 pm »
AFAIK, the "-s -" means (self-)signing for your machine only.
But again, I do not know that much about Mac: only a VM with OSX.
Codesigning the bootstrapper after download might be a nice trick however !

MiR

  • Full Member
  • ***
  • Posts: 246
Re: Fpcupdeluxe
« Reply #1744 on: December 10, 2020, 02:35:01 pm »
Also, when reading more on ldid and browsing through the source I started doubting if this tool will ever work, reason is that in this article:

http://iphonedevwiki.net/index.php/Code_Signing

they say:

jailbreaks patch the signature verification out of the kernel.

and when I read the ldid code correctly they are creating a self-signed certificate and as this is not in apple's trust chain it will likely not have any real value. (I might of course read the sources wrongly, I did not spend too much time on this).

MiR

  • Full Member
  • ***
  • Posts: 246
Re: Fpcupdeluxe
« Reply #1745 on: December 10, 2020, 02:36:59 pm »
Can you please codesign the compiler on github, then I can see if it works on my computer.....

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1746 on: December 10, 2020, 04:03:52 pm »
Signed:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/bootstrappers_v1.0/fpcup-3_3_1-aarch64-darwin-ppca64

I have included a screenshot of the signing process. As you can see, this process runs well.

MiR

  • Full Member
  • ***
  • Posts: 246
Re: Fpcupdeluxe
« Reply #1747 on: December 10, 2020, 04:59:34 pm »
MacOS seems to disagree:

Your binary (some output of copdesign deleted):
Code: [Select]
codesign --display --verbose fpcup-3_3_1-aarch64-darwin-ppca64
fpcup-3_3_1-aarch64-darwin-ppca64: no signature
TeamIdentifier=not set

My binary, signed with adhoc cert:
Code: [Select]
Signature=adhoc
TeamIdentifier=not set

Your Binary, signed with my Developer-ID:
Code: [Select]
Signature size=8973
TeamIdentifier=4S7HMLQE4Z

I have uploaded both a signed version of the compiler and the whole package here:

http://temp.michael-ring.org/fpcup-3_3_1-aarch64-darwin-ppca64.zip
http://temp.michael-ring.org/fpcupdeluxe-aarch64-darwin-cocoa.zip

You can use my signed version for the compiler on github if you want as it will (hopefully) not need to get rebuilt often, I have also uploaded a signed version of fpcupdeluxe, perhaps some other guy can check it on his M1 system, after signing it I did not need to replace the compiler in fpcbootstrap, but this could be some caching or other strange effect on my system as I have played around a lot with signatures today.


DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1748 on: December 10, 2020, 05:16:29 pm »
Thanks very much for your help with testing and the signed binaries. I will upload them.
Behind the screens, another user has also been very helpful reaching this target: adderthorn. I would like to thank him also.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Fpcupdeluxe
« Reply #1749 on: December 15, 2020, 11:21:54 am »
Hello there,

I finally got Lazarus running on Linux after using fpcupdeluxe. I want to rebuild the IDE and I got the following errror:

Code: Pascal  [Select][+][-]
  1. Warning: linker: /usr/bin/ld: cannot find -lGL
  2.  

What do I do to correct this problem?

Thanks for your assistance.

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1750 on: December 16, 2020, 05:49:21 am »
Two possibilities:
1:
You need to have libGL installed on your system. See: https://dri.freedesktop.org/wiki/libGL/ . Part of OpenGL.
2:
You have libGL on your system, but need an extra symlink. E.g. libGL.so.1 -> libGL.so

orbinaut

  • Newbie
  • Posts: 2
Re: Fpcupdeluxe
« Reply #1751 on: December 26, 2020, 05:06:58 pm »
Hello, are there any cross compiler libraries available for aarch64 Linux-Musl? If not how do I build them?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1738
Re: Fpcupdeluxe
« Reply #1752 on: December 27, 2020, 09:36:38 am »
Crossing towards aarch64 musl added.
Please test.
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/1.8.2i

orbinaut

  • Newbie
  • Posts: 2
Re: Fpcupdeluxe
« Reply #1753 on: December 27, 2020, 11:41:18 pm »
That seems to work for me. Thanks!

El Salvador

  • Full Member
  • ***
  • Posts: 133
Re: Fpcupdeluxe
« Reply #1754 on: January 07, 2021, 12:51:02 pm »
But Fpcupdeluxe support unattended installation? I need to make a simple script to install FPC + Lazarus (version x + cross compile) on github action runner.

 

TinyPortal © 2005-2018