carlosonunez / obs-installer-for-apple-silicon

Conveniently build and install OBS from source on your ultra-fast Apple M1 MacBook or Mac
206 stars 22 forks source link

ld: symbol(s) not found for architecture x86_64 #53

Open wodinga opened 2 years ago

wodinga commented 2 years ago

I'm trying to build by running install.sh but i keep getting the following error: ld: symbol(s) not found for architecture x86_64

I'm trying to build on my M1 iMac, so I'm not sure what this is referring to. Below are the logs.

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/libkern/OSAtomicDeprecated.h:503:9: note: 'OSAtomicCompareAndSwap32' has been explicitly marked deprecated here
bool    OSAtomicCompareAndSwap32( int32_t __oldValue, int32_t __newValue, volatile int32_t *__theValue );
        ^
1 warning generated.
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/graphics/graphics-imports.c.o
[ 14%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-io.c.o
12 warnings generated.
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-fourcc.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-matrices.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/media-io/audio-io.c.o
[ 15%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-frame.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/media-io/format-conversion.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/media-io/audio-resampler-ffmpeg.c.o
1 warning generated.
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/media-io/video-scaler-ffmpeg.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/media-io/media-remux.c.o
[ 16%] Building C object libobs/CMakeFiles/libobs.dir/util/array-serializer.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/file-serializer.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/base.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/cf-lexer.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/platform.c.o
[ 17%] Building C object libobs/CMakeFiles/libobs.dir/util/bmem.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/util/config-file.c.o
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/util/lexer.c.o
/tmp/obs/libobs/util/base.c:114:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
1 warning generated.
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/util/task.c.o
[ 18%] Linking C static library libsyphon-framework.a
[ 18%] Building C object libobs/CMakeFiles/libobs.dir/util/dstr.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/util/utf8.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/util/crc32.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/util/text-lookup.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/util/cf-parser.c.o
[ 19%] Built target syphon-framework
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/util/profiler.c.o
[ 19%] Building C object libobs/CMakeFiles/libobs.dir/obs-cocoa.m.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/util/bitstream.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/util/threading-posix.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/util/pipe-posix.c.o
[ 20%] Building C object libobs/CMakeFiles/libobs.dir/util/platform-nix.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/util/platform-cocoa.m.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-audio-controls.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-encoder.c.o
[ 21%] Building C object libobs/CMakeFiles/libobs.dir/obs-avc.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/obs-service.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/obs-source.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/obs-source-deinterlace.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/obs-source-transition.c.o
[ 22%] Building C object libobs/CMakeFiles/libobs.dir/obs-output.c.o
[ 23%] Building C object libobs/CMakeFiles/libobs.dir/obs-output-delay.c.o
[ 23%] Building C object libobs/CMakeFiles/libobs.dir/obs.c.o
[ 23%] Building C object libobs/CMakeFiles/libobs.dir/obs-properties.c.o
[ 23%] Building C object libobs/CMakeFiles/libobs.dir/obs-data.c.o
[ 23%] Building C object libobs/CMakeFiles/libobs.dir/obs-missing-files.c.o
[ 24%] Building C object libobs/CMakeFiles/libobs.dir/obs-hotkey.c.o
[ 24%] Building C object libobs/CMakeFiles/libobs.dir/obs-hotkey-name-map.c.o
[ 24%] Building C object libobs/CMakeFiles/libobs.dir/obs-module.c.o
[ 24%] Building C object libobs/CMakeFiles/libobs.dir/obs-display.c.o
[ 25%] Building C object libobs/CMakeFiles/libobs.dir/obs-view.c.o
[ 25%] Building C object libobs/CMakeFiles/libobs.dir/obs-audio.c.o
[ 25%] Building C object libobs/CMakeFiles/libobs.dir/obs-scene.c.o
[ 25%] Building C object libobs/CMakeFiles/libobs.dir/obs-video-gpu-encode.c.o
[ 25%] Building C object libobs/CMakeFiles/libobs.dir/obs-video.c.o
[ 26%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/osx/coreaudio-enum-devices.c.o
[ 26%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/osx/coreaudio-monitoring-available.c.o
[ 26%] Building C object libobs/CMakeFiles/libobs.dir/audio-monitoring/osx/coreaudio-output.c.o
[ 26%] Linking C shared library libobs.dylib
ld: warning: directory not found for option '-L/opt/homebrew/opt/openssl@1.1/lib'
ld: warning: ignoring file /tmp/obsdeps/lib/libjansson.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /tmp/obsdeps/lib/libavutil.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /tmp/obsdeps/lib/libavformat.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64ld: warning: ignoring file /tmp/obsdeps/lib/libswscale.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /tmp/obsdeps/lib/libavcodec.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

ld: warning: ignoring file /tmp/obsdeps/lib/libswresample.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_av_dict_copy", referenced from:
      _media_remux_job_create in media-remux.c.o
  "_av_find_best_stream", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
  "_av_frame_alloc", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
  "_av_frame_free", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
  "_av_freep", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _audio_resampler_create in audio-resampler-ffmpeg.c.o
      _audio_resampler_destroy in audio-resampler-ffmpeg.c.o
      _audio_resampler_resample in audio-resampler-ffmpeg.c.o
      _video_scaler_create in video-scaler-ffmpeg.c.o
      _video_scaler_destroy in video-scaler-ffmpeg.c.o
  "_av_image_alloc", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _video_scaler_create in video-scaler-ffmpeg.c.o
  "_av_interleaved_write_frame", referenced from:
      _media_remux_job_process in media-remux.c.o
  "_av_packet_unref", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _media_remux_job_process in media-remux.c.o
  "_av_pix_fmt_desc_get", referenced from:
      _video_scaler_create in video-scaler-ffmpeg.c.o
  "_av_read_frame", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _media_remux_job_process in media-remux.c.o
  "_av_rescale_q", referenced from:
      _media_remux_job_process in media-remux.c.o
  "_av_rescale_q_rnd", referenced from:
      _media_remux_job_process in media-remux.c.o
  "_av_rescale_rnd", referenced from:
      _audio_resampler_resample in audio-resampler-ffmpeg.c.o
  "_av_samples_alloc", referenced from:
      _audio_resampler_resample in audio-resampler-ffmpeg.c.o
  "_av_strerror", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _media_remux_job_process in media-remux.c.o
  "_av_write_trailer", referenced from:
      _media_remux_job_process in media-remux.c.o
  "_avcodec_alloc_context3", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
  "_avcodec_find_decoder", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
  "_avcodec_free_context", referenced from:
      _gs_create_texture_file_data in graphics-ffmpeg.c.o
      _ffmpeg_image_init in graphics-ffmpeg.c.o
      _gs_create_texture_file_data2 in graphics-ffmpeg.c.o
  "_avcodec_open2", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
  "_avcodec_parameters_copy", referenced from:
      _media_remux_job_create in media-remux.c.o
  "_avcodec_parameters_to_context", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
  "_avcodec_receive_frame", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
  "_avcodec_send_packet", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
  "_avformat_alloc_output_context2", referenced from:
      _media_remux_job_create in media-remux.c.o
  "_avformat_close_input", referenced from:
      _gs_create_texture_file_data in graphics-ffmpeg.c.o
      _ffmpeg_image_init in graphics-ffmpeg.c.o
      _gs_create_texture_file_data2 in graphics-ffmpeg.c.o
      _media_remux_job_create in media-remux.c.o
      _media_remux_job_destroy in media-remux.c.o
  "_avformat_find_stream_info", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
      _media_remux_job_create in media-remux.c.o
  "_avformat_free_context", referenced from:
      _media_remux_job_create in media-remux.c.o
      _media_remux_job_destroy in media-remux.c.o
  "_avformat_new_stream", referenced from:
      _media_remux_job_create in media-remux.c.o
  "_avformat_open_input", referenced from:
      _ffmpeg_image_init in graphics-ffmpeg.c.o
      _media_remux_job_create in media-remux.c.o
  "_avformat_write_header", referenced from:
      _media_remux_job_process in media-remux.c.o
  "_avio_close", referenced from:
      _media_remux_job_create in media-remux.c.o
      _media_remux_job_destroy in media-remux.c.o
  "_avio_open", referenced from:
      _media_remux_job_create in media-remux.c.o
  "_json_array", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_array_append_new", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_array_get", referenced from:
      _obs_data_add_json_item in obs-data.c.o
  "_json_array_size", referenced from:
      _obs_data_add_json_item in obs-data.c.o
  "_json_delete", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_get_json in obs-data.c.o
      _obs_data_save_json in obs-data.c.o
      _obs_data_save_json_safe in obs-data.c.o
  "_json_dumps", referenced from:
      _obs_data_get_json in obs-data.c.o
      _obs_data_save_json in obs-data.c.o
      _obs_data_save_json_safe in obs-data.c.o
  "_json_false", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_integer", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_integer_value", referenced from:
      _obs_data_add_json_item in obs-data.c.o
  "_json_loads", referenced from:
      _obs_data_create_from_json in obs-data.c.o
  "_json_object", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_object_iter", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_add_json_item in obs-data.c.o
  "_json_object_iter_key", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_add_json_item in obs-data.c.o
  "_json_object_iter_next", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_add_json_item in obs-data.c.o
  "_json_object_iter_value", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_add_json_item in obs-data.c.o
  "_json_object_key_to_iter", referenced from:
      _obs_data_create_from_json in obs-data.c.o
      _obs_data_add_json_item in obs-data.c.o
  "_json_object_set_new", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_real", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_real_value", referenced from:
      _obs_data_add_json_item in obs-data.c.o
  "_json_string", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_json_string_value", referenced from:
      _obs_data_add_json_item in obs-data.c.o
  "_json_true", referenced from:
      _obs_data_to_json in obs-data.c.o
  "_swr_alloc_set_opts", referenced from:
      _audio_resampler_create in audio-resampler-ffmpeg.c.o
  "_swr_convert", referenced from:
      _audio_resampler_resample in audio-resampler-ffmpeg.c.o
  "_swr_free", referenced from:
      _audio_resampler_create in audio-resampler-ffmpeg.c.o
      _audio_resampler_destroy in audio-resampler-ffmpeg.c.o
  "_swr_get_delay", referenced from:
      _audio_resampler_resample in audio-resampler-ffmpeg.c.o
  "_swr_init", referenced from:
      _audio_resampler_create in audio-resampler-ffmpeg.c.o
  "_swr_set_matrix", referenced from:
      _audio_resampler_create in audio-resampler-ffmpeg.c.o
  "_sws_freeContext", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _video_scaler_create in video-scaler-ffmpeg.c.o
      _video_scaler_destroy in video-scaler-ffmpeg.c.o
  "_sws_getCachedContext", referenced from:
      _video_scaler_create in video-scaler-ffmpeg.c.o
  "_sws_getCoefficients", referenced from:
      _video_scaler_create in video-scaler-ffmpeg.c.o
  "_sws_getContext", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
  "_sws_scale", referenced from:
      _ffmpeg_image_decode in graphics-ffmpeg.c.o
      _video_scaler_scale in video-scaler-ffmpeg.c.o
  "_sws_setColorspaceDetails", referenced from:
      _video_scaler_create in video-scaler-ffmpeg.c.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]: *** [libobs/libobs.0.dylib] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2
[Sun Mar 27 14:14:38 EDT 2022] FATAL: Unable to build OBS; see above logs for more info. Try running this instead: REPACKAGE=true ./install.sh