darling icon indicating copy to clipboard operation
darling copied to clipboard

Darling make fails on Ubuntu 22.04.1

Open liamromanis101 opened this issue 1 year ago • 2 comments

Build Log Hi I'm running Ubuntu 22.04.1. I initially had some issues with the clang++ version and fixed this by installing binaries following the guide here: https://github.com/agavrel/darling_tutorial. cmake completes properly but when running make I get the below error

I have tried adding DCMAKE_BUILD_TYPE=x86_64 to the cmake command but it still fails with this error:

[ 69%] Linking C shared library ImageKit
ld: warning: static initializer found in 'CMakeFiles/ImageKit.dir/src/ImageKit.m.o'. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_ICCameraFile", referenced from:
      __OBJC_$_CATEGORY_ICCameraFile_$_IK in ICCameraFile+IK.m.o
  "_OBJC_CLASS_$_ICDevice", referenced from:
      __OBJC_$_CATEGORY_ICDevice_$_IKDeviceBrowserViewExtension in ICDevice+IKDeviceBrowserViewExtension.m.o
ld: symbol(s) not found for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/build.make:6934: src/frameworks/Quartz/ImageKit/ImageKit] Error 1
make[1]: *** [CMakeFiles/Makefile2:54915: src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

System Information 6.5.0-14-generic #14~22.04.1-Ubuntu

Software Version
Clang 12.0.0
CMake 3.22.1
Linux Kernel 6.5.0-14
Darling f3b0ae0c35d6382fa584b025de7b1bce009feb83

liamromanis101 avatar Jan 26 '24 09:01 liamromanis101

Having the same issue with Ubuntu 20.04

aviadlevy avatar Feb 09 '24 06:02 aviadlevy

I have the same issue with debian 11

clang 11.0.1 cmake 3.18.4 Linux Kernel 5.15.126

[ 69%] Linking C shared library ImageKit
ld: warning: OS dylibs should not add rpaths (linker option: -rpath) (Xcode build setting: LD_RUNPATH_SEARCH_PATHS)
ld: warning: static initializer found in 'CMakeFiles/ImageKit.dir/src/ImageKit.m.o'. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_ICCameraFile", referenced from:
      __OBJC_$_CATEGORY_ICCameraFile_$_IK in ICCameraFile+IK.m.o
  "_OBJC_CLASS_$_ICDevice", referenced from:
      __OBJC_$_CATEGORY_ICDevice_$_IKDeviceBrowserViewExtension in ICDevice+IKDeviceBrowserViewExtension.m.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/build.make:6513: src/frameworks/Quartz/ImageKit/ImageKit] Error 1
make[1]: *** [CMakeFiles/Makefile2:58268: src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

eycer1995 avatar Mar 22 '24 21:03 eycer1995

experiencing the same issue as well:

[ 72%] Linking C shared library ImageKit
ld: warning: OS dylibs should not add rpaths (linker option: -rpath) (Xcode build setting: LD_RUNPATH_SEARCH_PATHS)
ld: warning: static initializer found in 'CMakeFiles/ImageKit.dir/src/ImageKit.m.o'. Use -no_inits to make this an error.  Use -no_warn_inits to suppress warning
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_ICCameraFile", referenced from:
      __OBJC_$_CATEGORY_ICCameraFile_$_IK in ICCameraFile+IK.m.o
  "_OBJC_CLASS_$_ICDevice", referenced from:
      __OBJC_$_CATEGORY_ICDevice_$_IKDeviceBrowserViewExtension in ICDevice+IKDeviceBrowserViewExtension.m.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/build.make:6933: recipe for target 'src/frameworks/Quartz/ImageKit/ImageKit' failed
make[2]: *** [src/frameworks/Quartz/ImageKit/ImageKit] Error 1
CMakeFiles/Makefile2:57472: recipe for target 'src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/all' failed
make[1]: *** [src/frameworks/Quartz/ImageKit/CMakeFiles/ImageKit.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

on:

  • clang 11.1.0
  • cmake 3.25.2
  • (Ubuntu) Linux Kernel 5.4.0-1106
  • Darling 7c8415e679b59641f9f7aede78ed0acb2972051f

neomafo88 avatar Apr 18 '24 22:04 neomafo88

Exactly the same error here:

Ubuntu 22.04 Ubuntu clang version 14.0.0-1ubuntu1.1 cmake 3.22.1 Linux Kernel: 6.5.0-27-generic

mchrgr2000 avatar May 09 '24 07:05 mchrgr2000

@mchrgr2000

Can you post the output of cmake when you run it? I want to see what clang version it tries to use.

CuriousTommy avatar May 17 '24 01:05 CuriousTommy

So I wasn't able to reproduce this with clang-14, but I was able to with clang-12. Try the ubuntu_older_clang_build_fix branch and let me know if that resolves the build issue for you all.

CuriousTommy avatar May 17 '24 23:05 CuriousTommy