Recent

Author Topic: Getting error connected to libiconv.tbd:4'18: error: unknown enumerated scalar  (Read 1772 times)

MISV

  • Hero Member
  • *****
  • Posts: 652
When I try to compile I get this error:

Quote
ld: warning: object file (/Users/xxx/lazarus-components-cocoa64bit/VirtualTreeView-Lazarus-v5/Source/lib/x86_64-darwin-cocoa/fakemmsystem.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: warning: object file (/Users/xxx/lazarus-components-cocoa64bit/lclextensions-0/lib/x86_64-darwin-cocoa/delphicompat.o) was built for newer OSX version (10.13) than being linked (10.8 )
ld: malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd:4:18: error: unknown enumerated scalar
platform:        zippered
                 ^~~~~~~~
 file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd'
An error occurred while linking
MyApp.dpr(166,0) Error: Error while linking
MyApp.dpr(166,0) Verbose: There were 1 errors compiling module, stopping
Verbose: Compilation aborted
Verbose: /Users/xxx/lazaruscoc64bit/fpc/bin/x86_64-darwin/ppcx64 returned an error exitcode

I recall in another thread that this can safely be ignored for now since they are the same:
Quote
was built for newer OSX version (10.13) than being linked (10.8 )
(and it is something I am used to see as I use the -WM10.8 in custom options)

However - I recently updated commanded line tools - and I think that is to blame for:
Quote
ld: malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd:4:18: error: unknown enumerated scalar
platform:        zippered
                 ^~~~~~~~
 file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib//libiconv.tbd'

Any ideas on how to fix this somehow? Preferably maybe by renaming/bring back old command line tools? (if indeed I am right that is the reason) Or some setting somewhere?

I am on a fully updated Mojave 10.14.4
« Last Edit: March 27, 2019, 11:14:24 pm by MISV »

MISV

  • Hero Member
  • *****
  • Posts: 652
I think this is a clang / lldb issue someshow - but I know much too little about this.

When clicking "show info" on
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/user/lib/libiconv.tbd
it points to original
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/user/lib/libiconv.2.tbd

In my system I have
Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/user/lib/libiconv.tbd
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/user/lib/libiconv.2.tbd
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/user/lib/libiconv.2.4.0.tbd

MISV

  • Hero Member
  • *****
  • Posts: 652
I think this relates to
https://forum.lazarus.freepascal.org/index.php/topic,44453.15.html

and wha on earlier SDK versions would give error

Quote
ld: warning: URGENT: building for OSX, but linking against dylib (/usr/lib//libiconv.dylib) built for (unknown). Note: This will be an error in the future.

Will look through that thread again and see if I can fix my installation

MISV

  • Hero Member
  • *****
  • Posts: 652
I am getting the same error when downloading lazarus/fpc trunk (and I think stable as well) using fpcupdeluxe:

https://forum.lazarus.freepascal.org/index.php/topic,34645.msg315595.html#msg315595

(Hopefully we can help each other getting this permanently solved. I personally like solutions like fpcupdeluxe because it helps ease installation and keep completely separate installations of lazarus - i.e. stable, trunk etc. As I understand the issue - it should be possible to solve - I would like to volunteer testing if that helps anything)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1171
Have you seen the most recent answers in this thread ?

https://forum.qt.io/topic/101278/build-make-error-ld-malformed-file-unknown-enumerated-scalar-platform-zippered/2

This really seems to be a clang / ld issue.
Please perform a "ld -v" to get info about ld.


MISV

  • Hero Member
  • *****
  • Posts: 652
The solution was adding
-FD/Library/Developer/CommandLineTools/usr/bin

See posts around this:
https://forum.lazarus.freepascal.org/index.php/topic,44453.msg315653.html#msg315653