Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: DonaldShimoda on May 31, 2017, 07:32:00 pm

Title: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 07:32:00 pm
I have problems compiling some packages ONLY under DARWIN. Have no clue where to start.

Same packages compiles ok on linux, windows, linux-arm, etc

What to start checking? seems like an OS limitations
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 07:41:22 pm
Thats the file content BTW

Code: Pascal  [Select][+][-]
  1. #!/bin/sh
  2. DoExitAsm ()
  3. { echo "An error occurred while assembling $1"; exit 1; }
  4. DoExitLink ()
  5. { echo "An error occurred while linking $1"; exit 1; }
  6. OFS=$IFS
  7. IFS="
  8. "
  9. /usr/bin/ld /usr/lib/crt1.o    -framework Carbon -framework OpenGL -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib     -multiply_defined suppress -L. -o ../lazarus `cat ../link.res`  -pagezero_size 0x10000
  10. if [ $? != 0 ]; then DoExitLink ; fi
  11. IFS=$OFS

Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: Phil on May 31, 2017, 07:46:55 pm
I have problems compiling some packages ONLY under DARWIN. Have no clue where to start.

What version of OS X is your Mac running? And ld? And FPC? And Lazarus?

ld -v
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 07:50:50 pm
I have problems compiling some packages ONLY under DARWIN. Have no clue where to start.

What version of OS X is your Mac running? And ld? And FPC? And Lazarus?

ld -v

All the latest.

DARWIN 10.12.5

FPC and LAZARUS TRUNK

ld
@(#)PROGRAM:ld  PROJECT:ld64-278.4
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: LLVM version 8.1.0, (clang-802.0.42)
TAPI support using: Apple TAPI version 1.33.11

Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: Phil on May 31, 2017, 07:53:54 pm
I have problems compiling some packages ONLY under DARWIN. Have no clue where to start.

What version of OS X is your Mac running? And ld? And FPC? And Lazarus?

ld -v
All the latest.

What happens if you run ppaslink.sh from Terminal command line? Any difference?

What packages?

Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 08:09:35 pm
I have problems compiling some packages ONLY under DARWIN. Have no clue where to start.

What version of OS X is your Mac running? And ld? And FPC? And Lazarus?

ld -v
All the latest.

What happens if you run ppaslink.sh from Terminal command line? Any difference?

What packages?

Nothing happens because try to reach 64 bits compiler. Im using fpcupdeluxe BTW so, i have no access to the same paths definitions on command line.

It happens with ANY package, just after some packages i installed , i add one more and fails.
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: Phil on May 31, 2017, 08:21:19 pm
Nothing happens because try to reach 64 bits compiler. Im using fpcupdeluxe BTW so, i have no access to the same paths definitions on command line.

It happens with ANY package, just after some packages i installed , i add one more and fails.

Try standard Laz 1.6.4 installation. If no problem there, then it's fpcupdeluxe.
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonAlfredo on May 31, 2017, 08:57:52 pm
If this is a fpcupdeluxe install, please post your fpc.cfg.
And can you give more info about the package(s) you try to install ?
Edit: and the link.res ?
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 09:00:36 pm
Nothing happens because try to reach 64 bits compiler. Im using fpcupdeluxe BTW so, i have no access to the same paths definitions on command line.

It happens with ANY package, just after some packages i installed , i add one more and fails.

Try standard Laz 1.6.4 installation. If no problem there, then it's fpcupdeluxe.

lazarus 1.6.4 refuse to build using trunk fpc.

So, i cannot know where the problem is (i need FPC 3.1.1 BTW)
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 09:05:49 pm
If this is a fpcupdeluxe install, please post your fpc.cfg.
And can you give more info about the package(s) you try to install ?
Edit: and the link.res ?

This is the fpc.cfg

https://dl.dropboxusercontent.com/u/76375897/Temp/fpc.cfg

The package is REMOBJECTS DATAABSTRACT SERVER. have no idea wich more specific info to give , except it builds on linux 32, linux 64, linux arm, win32, win64... Inall that installations i use the same sequence (but no fpcupdeluxe) Just native by hand build as explained on my blog. Just using fpcupdeluxe for mac os.

Best regards
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonAlfredo on May 31, 2017, 09:28:51 pm
In your fpc.cfg, would you comment out the -ap swith ? Its just a wild guess ...
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on May 31, 2017, 09:43:11 pm
In your fpc.cfg, would you comment out the -ap swith ? Its just a wild guess ...

Done. no luck.  :-X
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonAlfredo on June 01, 2017, 07:06:05 am
Ok. Need more details.
Quote
Nothing happens because try to reach 64 bits compiler.
What do you mean by this ?
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on June 01, 2017, 02:36:14 pm
Ok. Need more details.
Quote
Nothing happens because try to reach 64 bits compiler.
What do you mean by this ?

Running from command line do nothing. I bet because can't find fpc version compiled for fcupdeluxe?

Code: Pascal  [Select][+][-]
  1. cat: ../link.res: No such file or directory
  2. ld: warning: -arch not specified
  3. ld: warning: -macosx_version_min not specified, assuming 10.10
  4. Undefined symbols for architecture x86_64:
  5.   "___keymgr_dwarf2_register_sections", referenced from:
  6.       __start in crt1.o
  7.   "__cthread_init_routine", referenced from:
  8.       __start in crt1.o
  9.   "_atexit", referenced from:
  10.       __start in crt1.o
  11.   "_errno", referenced from:
  12.       __start in crt1.o
  13.   "_exit", referenced from:
  14.       __start in crt1.o
  15.   "_mach_init_routine", referenced from:
  16.       __start in crt1.o
  17.   "_main", referenced from:
  18.       __start in crt1.o
  19. ld: symbol(s) not found for inferred architecture x86_64
  20. An error occurred while linking
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonAlfredo on June 01, 2017, 02:57:38 pm
Ok. Perhaps I understand now.

Fpcupdeluxe installs a FPC/Laz combi without changing anything to the host-PC.
Meaning: no paths are set.
Meaning: FPC will not be found from the command line unless the full path is specified.

I think you encounter the same problem that prevent Mac specific packages (like for iPhone) to work:
fpcupdeluxe makes a local install.

For some (like me)very usefull, for others (like you I presume) causing problems.
Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonaldShimoda on June 01, 2017, 03:04:47 pm
Ok. Perhaps I understand now.

Fpcupdeluxe installs a FPC/Laz combi without changing anything to the host-PC.
Meaning: no paths are set.
Meaning: FPC will not be found from the command line unless the full path is specified.

I think you encounter the same problem that prevent Mac specific packages (like for iPhone) to work:
fpcupdeluxe makes a local install.

For some (like me)very usefull, for others (like you I presume) causing problems.

My friend i appreciate a lot your work. I don't understand why you think im not. Im not telling is a fcpupdeluxe problem. Is clear is a fail because the total path called is too long for mac. Is not a package problem, is a problem with the AMOUNT of installed packages! I bet because the path need to build lazarus is TOO LONG for the command line because the amount of packages i have.

If i remove another package and install the last one failed to installed, it works! So, is clearly a problem with the amount of packages.

Now, that DONT HAPPENS TO ME on another OS, like i say, neither with another platforms, very different, like arm , intel 386 or and 64. The problem is on that platforms i DOMNT USING fpcupdeluxe so i can't say is a fpcupdeluxe problem (because the amount of packages i use) or is a OS X problem.

I hope is clear now, i love your job, and i don't have any interest on critic that work, at all.

Any other idea to tes? theres any place to see the path as is called at the OS?

Best regards.

Title: Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
Post by: DonAlfredo on June 01, 2017, 03:32:08 pm
Don't worry : I did not have any negative emotions or whatever about your posts !
In fact, all remarks of users of fpcupdeluxe have helped it to get where it is now.
Again, don't worry, I am an old man ... ;-)

Will look further into your problem.
TinyPortal © 2005-2018