Recent

Author Topic: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long  (Read 7181 times)

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
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

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #1 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


Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #2 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

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #3 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


Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #4 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?


DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #5 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.

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #6 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.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #7 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 ?
« Last Edit: May 31, 2017, 08:59:27 pm by DonAlfredo »

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #8 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)

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #9 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

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #10 on: May 31, 2017, 09:28:51 pm »
In your fpc.cfg, would you comment out the -ap swith ? Its just a wild guess ...

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #11 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

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #12 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 ?

DonaldShimoda

  • Jr. Member
  • **
  • Posts: 89
    • Parallel Pascal Worlds
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #13 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

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Re: ./../ppaslink.sh: line 9: /usr/bin/ld: Argument list too long
« Reply #14 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.