Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX: illegal hardware instruction osx10.14 Mojave #1250

Closed
haowanxing opened this issue Oct 24, 2018 · 18 comments
Closed

OSX: illegal hardware instruction osx10.14 Mojave #1250

haowanxing opened this issue Oct 24, 2018 · 18 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@haowanxing
Copy link

haowanxing commented Oct 24, 2018

I finished the upgrade of my OS which up to 10.14 (the latest version) but found that SRS was not runnable again. I tried configure and make command. there is no trouble but run the "./objs/srs -c my.conf".

------------------------------------------------------------
~/git/srs/trunk(master) » ./objs/srs -c my.conf                                                                                                                                         anthony@Anthony-Air
'

Translation: The command './objs/srs -c my.conf' is being executed in the directory '~/git/srs/trunk' by the user 'anthony' on the device 'Anthony-Air'.
[2018-10-24 15:55:37.729][trace][13375][0] XCORE-SRS/2.0.257(ZhouGuowen)
[2018-10-24 15:55:37.730][trace][13375][0] config parse complete
[2018-10-24 15:55:37.730][trace][13375][0] write log to console
[2018-10-24 15:55:37.730][trace][13375][0] srs checking config...
[2018-10-24 15:55:37.731][trace][13375][0] detect intranet address: 127.0.0.1, ifname=lo0
[2018-10-24 15:55:37.731][trace][13375][0] retrieve local ipv4 ip=192.168.123.5, index=0
[2018-10-24 15:55:37.731][trace][13375][0] detect intranet address: 192.168.123.5, ifname=en0
[2018-10-24 15:55:37.731][warn][13375][0][0] stats network use index=0, ip=192.168.123.5
[2018-10-24 15:55:37.731][warn][13375][0][0] stats disk list: vda vda1 
[2018-10-24 15:55:37.731][trace][13375][0] write log to console
[2018-10-24 15:55:37.731][trace][13375][0] SRS/2.0.257(ZhouGuowen), stable is SRS/2.0release
[2018-10-24 15:55:37.731][trace][13375][0] license: The MIT License (MIT), Copyright (c) 2013-2015 SRS(ossrs)
[2018-10-24 15:55:37.731][trace][13375][0] primary/master: SRS/2.0release
[2018-10-24 15:55:37.731][trace][13375][0] authors: winlin,wenjie.zhao
[2018-10-24 15:55:37.731][trace][13375][0] contributors: winlin<winlin@vip.126.com> wenjie.zhao<740936897@qq.com> xiangcheng.liu<liuxc0116@foxmail.com> naijia.liu<youngcow@youngcow.net> alcoholyi<alcoholyi@qq.com> byteman<wangchen2011@gmail.com> chad.wang<chad.wang.cn@gmail.com> suhetao<suhetao@gmail.com> Johnny<fengjihu@163.com> karthikeyan<keyanmca@gmail.com> StevenLiu<lq@chinaffmpeg.org> zhengfl<zhengfl_1989@126.com> tufang14<breadbean1449@gmail.com> allspace<allspace@gmail.com> niesongsong<nie950@gmail.com> rudeb0t<nimrod@themanxgroup.tw> CallMeNP<np.liamg@gmail.com> synote<synote@qq.com> lovecat<littlefawn@163.com> panda1986<542638787@qq.com> YueHonghui<hongf.yue@hotmail.com> JuntaoLiu<juntliu@gmail.com> 
[2018-10-24 15:55:37.731][trace][13375][0] uname: Darwin Anthony-Air.lan 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
[2018-10-24 15:55:37.731][trace][13375][0] build: 2018-10-24 15:54:16, little-endian
[2018-10-24 15:55:37.731][trace][13375][0] configure:  --with-http-callback --with-http-api --with-stream-caster --with-ingest --osx
[2018-10-24 15:55:37.731][trace][13375][0] features: --prefix=/usr/local/srs --with-hls --with-hds --with-dvr --without-nginx --with-ssl --without-ffmpeg --with-transcode --with-ingest --with-stat --with-http-callback --with-http-server --with-stream-caster --with-http-api --with-librtmp --without-research --without-utest --without-gperf --without-gmc --without-gmp --without-gcp --without-gprof --without-arm-ubuntu12 --without-mips-ubuntu12 --log-trace
[2018-10-24 15:55:37.731][trace][13375][0] conf: my.conf, limit: 249
[2018-10-24 15:55:37.731][trace][13375][0] SRS for OSX
[2018-10-24 15:55:37.731][trace][13375][0] writev limits write 1024 iovs a time
[2018-10-24 15:55:37.731][warn][13375][0][0] stream caster is experiment feature.
[2018-10-24 15:55:37.731][trace][13375][0] check feature rtmp handshake: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature hls: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature hds: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature http callback: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature http api: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature http server: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature http parser: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature dvr: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature transcode: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature ingest: on
[2018-10-24 15:55:37.731][trace][13375][0] check feature system stat: on
[2018-10-24 15:55:37.731][warn][13375][0][0] check feature compile nginx: off
[2018-10-24 15:55:37.731][warn][13375][0][0] check feature compile ffmpeg: off
[2018-10-24 15:55:37.731][trace][13375][0] stream caster: on
[2018-10-24 15:55:37.731][trace][13375][0] MR(merged-read): on, @see https://github.com/ossrs/srs/issues/241
[2018-10-24 15:55:37.731][trace][13375][0] MR(merged-read) default 0 sleep 350
[2018-10-24 15:55:37.731][trace][13375][0] MW(merged-write) default sleep 350
[2018-10-24 15:55:37.731][trace][13375][0] read chunk stream cache cid [0, 16)
[2018-10-24 15:55:37.731][trace][13375][0] default gop cache 1, play queue 30s
[2018-10-24 15:55:37.731][trace][13375][0] complex send algorithm enabled.
[2018-10-24 15:55:37.731][warn][13375][0][0] TCP_NODELAY enabled, may hurts performance.
[2018-10-24 15:55:37.731][trace][13375][0] auto guess socket send buffer by merged write
[2018-10-24 15:55:37.731][trace][13375][0] system default latency in ms: mw(0-350) + mr(0-350) + play-queue(0-30000)
[2018-10-24 15:55:37.731][trace][13375][0] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2018-10-24 15:55:37.731][trace][13375][0] http: root mount to ./objs/nginx/html
[2018-10-24 15:55:37.731][trace][13375][0] st_set_eventsys to kqueue
[2018-10-24 15:55:37.732][trace][13375][0] st_init success, use kqueue
[2018-10-24 15:55:37.732][trace][13375][100] server main cid=100, pid=13375, ppid=477, asprocess=0
[2018-10-24 15:55:37.732][trace][13375][100] write pid=13375 to ./objs/srs.pid success!
[1]    13375 illegal hardware instruction  ./objs/srs -c my.conf
------------------------------------------------------------

TRANS_BY_GPT3

@haowanxing
Copy link
Author

haowanxing commented Oct 24, 2018

new error when I exec "make":

/Library/Developer/CommandLineTools/usr/bin/make _default
build the srs(simple rtmp server) over st(state-threads)
/Library/Developer/CommandLineTools/usr/bin/make -f objs/Makefile srs
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/core -Iobjs \
          -o objs/src/core/srs_core.o src/core/srs_core.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/core -Iobjs \
          -o objs/src/core/srs_core_autofree.o src/core/srs_core_autofree.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/core -Iobjs \
          -o objs/src/core/srs_core_performance.o src/core/srs_core_performance.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/core -Iobjs \
          -o objs/src/core/srs_core_mem_watch.o src/core/srs_core_mem_watch.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_error.o src/kernel/srs_kernel_error.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_log.o src/kernel/srs_kernel_log.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_stream.o src/kernel/srs_kernel_stream.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_utility.o src/kernel/srs_kernel_utility.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_flv.o src/kernel/srs_kernel_flv.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_codec.o src/kernel/srs_kernel_codec.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_file.o src/kernel/srs_kernel_file.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_consts.o src/kernel/srs_kernel_consts.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_aac.o src/kernel/srs_kernel_aac.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_mp3.o src/kernel/srs_kernel_mp3.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_ts.o src/kernel/srs_kernel_ts.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/kernel -Isrc/core  -Iobjs \
          -o objs/src/kernel/srs_kernel_buffer.o src/kernel/srs_kernel_buffer.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_amf0.o src/protocol/srs_rtmp_amf0.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_io.o src/protocol/srs_rtmp_io.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_stack.o src/protocol/srs_rtmp_stack.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_handshake.o src/protocol/srs_rtmp_handshake.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_utility.o src/protocol/srs_rtmp_utility.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtmp_msg_array.o src/protocol/srs_rtmp_msg_array.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_protocol_buffer.o src/protocol/srs_protocol_buffer.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_raw_avc.o src/protocol/srs_raw_avc.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_rtsp_stack.o src/protocol/srs_rtsp_stack.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_http_stack.o src/protocol/srs_http_stack.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_protocol_kbps.o src/protocol/srs_protocol_kbps.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/protocol -Isrc/core  -Isrc/kernel  -Iobjs -Iobjs/openssl/include \
          -o objs/src/protocol/srs_protocol_json.o src/protocol/srs_protocol_json.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_server.o src/app/srs_app_server.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_conn.o src/app/srs_app_conn.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_rtmp_conn.o src/app/srs_app_rtmp_conn.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_source.o src/app/srs_app_source.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_refer.o src/app/srs_app_refer.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_hls.o src/app/srs_app_hls.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_forward.o src/app/srs_app_forward.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_encoder.o src/app/srs_app_encoder.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_stream.o src/app/srs_app_http_stream.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_thread.o src/app/srs_app_thread.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_bandwidth.o src/app/srs_app_bandwidth.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_st.o src/app/srs_app_st.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_log.o src/app/srs_app_log.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_config.o src/app/srs_app_config.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_pithy_print.o src/app/srs_app_pithy_print.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_reload.o src/app/srs_app_reload.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_api.o src/app/srs_app_http_api.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_conn.o src/app/srs_app_http_conn.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_hooks.o src/app/srs_app_http_hooks.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_ingest.o src/app/srs_app_ingest.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_ffmpeg.o src/app/srs_app_ffmpeg.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_utility.o src/app/srs_app_utility.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_dvr.o src/app/srs_app_dvr.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_edge.o src/app/srs_app_edge.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_heartbeat.o src/app/srs_app_heartbeat.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_empty.o src/app/srs_app_empty.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_client.o src/app/srs_app_http_client.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_http_static.o src/app/srs_app_http_static.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_recv_thread.o src/app/srs_app_recv_thread.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_security.o src/app/srs_app_security.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_statistic.o src/app/srs_app_statistic.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_hds.o src/app/srs_app_hds.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_mpegts_udp.o src/app/srs_app_mpegts_udp.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_rtsp.o src/app/srs_app_rtsp.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_listener.o src/app/srs_app_listener.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_async_call.o src/app/srs_app_async_call.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/app -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Iobjs/st -Iobjs/hp -Iobjs/openssl/include -Iobjs \
          -o objs/src/app/srs_app_caster_flv.o src/app/srs_app_caster_flv.cpp
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/main -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Isrc/app  -Iobjs/st -Iobjs -Iobjs/hp -Iobjs/openssl/include \
          -o objs/src/main/srs_main_server.o src/main/srs_main_server.cpp
g++ -o objs/srs objs/src/core/srs_core.o objs/src/core/srs_core_autofree.o objs/src/core/srs_core_performance.o objs/src/core/srs_core_mem_watch.o objs/src/kernel/srs_kernel_error.o objs/src/kernel/srs_kernel_log.o objs/src/kernel/srs_kernel_stream.o objs/src/kernel/srs_kernel_utility.o objs/src/kernel/srs_kernel_flv.o objs/src/kernel/srs_kernel_codec.o objs/src/kernel/srs_kernel_file.o objs/src/kernel/srs_kernel_consts.o objs/src/kernel/srs_kernel_aac.o objs/src/kernel/srs_kernel_mp3.o objs/src/kernel/srs_kernel_ts.o objs/src/kernel/srs_kernel_buffer.o objs/src/protocol/srs_rtmp_amf0.o objs/src/protocol/srs_rtmp_io.o objs/src/protocol/srs_rtmp_stack.o objs/src/protocol/srs_rtmp_handshake.o objs/src/protocol/srs_rtmp_utility.o objs/src/protocol/srs_rtmp_msg_array.o objs/src/protocol/srs_protocol_buffer.o objs/src/protocol/srs_raw_avc.o objs/src/protocol/srs_rtsp_stack.o objs/src/protocol/srs_http_stack.o objs/src/protocol/srs_protocol_kbps.o objs/src/protocol/srs_protocol_json.o objs/src/app/srs_app_server.o objs/src/app/srs_app_conn.o objs/src/app/srs_app_rtmp_conn.o objs/src/app/srs_app_source.o objs/src/app/srs_app_refer.o objs/src/app/srs_app_hls.o objs/src/app/srs_app_forward.o objs/src/app/srs_app_encoder.o objs/src/app/srs_app_http_stream.o objs/src/app/srs_app_thread.o objs/src/app/srs_app_bandwidth.o objs/src/app/srs_app_st.o objs/src/app/srs_app_log.o objs/src/app/srs_app_config.o objs/src/app/srs_app_pithy_print.o objs/src/app/srs_app_reload.o objs/src/app/srs_app_http_api.o objs/src/app/srs_app_http_conn.o objs/src/app/srs_app_http_hooks.o objs/src/app/srs_app_ingest.o objs/src/app/srs_app_ffmpeg.o objs/src/app/srs_app_utility.o objs/src/app/srs_app_dvr.o objs/src/app/srs_app_edge.o objs/src/app/srs_app_heartbeat.o objs/src/app/srs_app_empty.o objs/src/app/srs_app_http_client.o objs/src/app/srs_app_http_static.o objs/src/app/srs_app_recv_thread.o objs/src/app/srs_app_security.o objs/src/app/srs_app_statistic.o objs/src/app/srs_app_hds.o objs/src/app/srs_app_mpegts_udp.o objs/src/app/srs_app_rtsp.o objs/src/app/srs_app_listener.o objs/src/app/srs_app_async_call.o objs/src/app/srs_app_caster_flv.o objs/src/main/srs_main_server.o objs/st/libst.a objs/hp/libhttp_parser.a objs/openssl/lib/libssl.a objs/openssl/lib/libcrypto.a -ldl
build the srs_ingest_hls for srs
/Library/Developer/CommandLineTools/usr/bin/make -f objs/Makefile srs_ingest_hls
g++ -c -ansi -Wall -g -O0 -fPIC  -Isrc/main -Isrc/core  -Isrc/kernel  -Isrc/protocol  -Isrc/app  -Iobjs/st -Iobjs -Iobjs/hp -Iobjs/openssl/include \
          -o objs/src/main/srs_main_ingest_hls.o src/main/srs_main_ingest_hls.cpp
g++ -o objs/srs_ingest_hls objs/src/core/srs_core.o objs/src/core/srs_core_autofree.o objs/src/core/srs_core_performance.o objs/src/core/srs_core_mem_watch.o objs/src/kernel/srs_kernel_error.o objs/src/kernel/srs_kernel_log.o objs/src/kernel/srs_kernel_stream.o objs/src/kernel/srs_kernel_utility.o objs/src/kernel/srs_kernel_flv.o objs/src/kernel/srs_kernel_codec.o objs/src/kernel/srs_kernel_file.o objs/src/kernel/srs_kernel_consts.o objs/src/kernel/srs_kernel_aac.o objs/src/kernel/srs_kernel_mp3.o objs/src/kernel/srs_kernel_ts.o objs/src/kernel/srs_kernel_buffer.o objs/src/protocol/srs_rtmp_amf0.o objs/src/protocol/srs_rtmp_io.o objs/src/protocol/srs_rtmp_stack.o objs/src/protocol/srs_rtmp_handshake.o objs/src/protocol/srs_rtmp_utility.o objs/src/protocol/srs_rtmp_msg_array.o objs/src/protocol/srs_protocol_buffer.o objs/src/protocol/srs_raw_avc.o objs/src/protocol/srs_rtsp_stack.o objs/src/protocol/srs_http_stack.o objs/src/protocol/srs_protocol_kbps.o objs/src/protocol/srs_protocol_json.o objs/src/app/srs_app_server.o objs/src/app/srs_app_conn.o objs/src/app/srs_app_rtmp_conn.o objs/src/app/srs_app_source.o objs/src/app/srs_app_refer.o objs/src/app/srs_app_hls.o objs/src/app/srs_app_forward.o objs/src/app/srs_app_encoder.o objs/src/app/srs_app_http_stream.o objs/src/app/srs_app_thread.o objs/src/app/srs_app_bandwidth.o objs/src/app/srs_app_st.o objs/src/app/srs_app_log.o objs/src/app/srs_app_config.o objs/src/app/srs_app_pithy_print.o objs/src/app/srs_app_reload.o objs/src/app/srs_app_http_api.o objs/src/app/srs_app_http_conn.o objs/src/app/srs_app_http_hooks.o objs/src/app/srs_app_ingest.o objs/src/app/srs_app_ffmpeg.o objs/src/app/srs_app_utility.o objs/src/app/srs_app_dvr.o objs/src/app/srs_app_edge.o objs/src/app/srs_app_heartbeat.o objs/src/app/srs_app_empty.o objs/src/app/srs_app_http_client.o objs/src/app/srs_app_http_static.o objs/src/app/srs_app_recv_thread.o objs/src/app/srs_app_security.o objs/src/app/srs_app_statistic.o objs/src/app/srs_app_hds.o objs/src/app/srs_app_mpegts_udp.o objs/src/app/srs_app_rtsp.o objs/src/app/srs_app_listener.o objs/src/app/srs_app_async_call.o objs/src/app/srs_app_caster_flv.o objs/src/main/srs_main_ingest_hls.o objs/st/libst.a objs/hp/libhttp_parser.a objs/openssl/lib/libssl.a objs/openssl/lib/libcrypto.a -ldl
ld: can't write output file: objs/srs_ingest_hls for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [objs/srs_ingest_hls] Error 1
make[1]: *** [srs_ingest_hls] Error 2
make: *** [default] Error 2

"sudo make" is worked but also not runnable

winlinvip referenced this issue in ossrs/state-threads Oct 28, 2018
@winlinvip winlinvip changed the title illegal hardware instruction osx10.14 illegal hardware instruction osx10.14 Mojave Oct 28, 2018
@winlinvip winlinvip added the Bug It might be a bug. label Oct 28, 2018
@winlinvip winlinvip added this to the srs 2.0 release milestone Oct 28, 2018
@winlinvip
Copy link
Member

winlinvip commented Oct 28, 2018

It's a bug of ST, fixed.

@iniwf
Copy link

iniwf commented Oct 28, 2018

It's a bug of ST, fixed.

macOS 10.14 can be compiled successfully, but it automatically quits after a while of starting up.

TRANS_BY_GPT3

@haowanxing
Copy link
Author

there is no bug when "make". but "illegal" also exists.
image

@winlinvip
Copy link
Member

Seems ST doesn't support macOS10.14:

[2018-11-11 13:57:56.910][Trace][12246][100] signal installed, reload=1, reopen=30, grace_quit=15
[2018-11-11 13:57:56.910][Trace][12246][100] http: api mount /console to ./objs/nginx/html/console
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.
Process 12246 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=12, subcode=0x0)
    frame #0: 0x00000001003bd6ca srs`st_thread_create(start=(0x00007fffc79d2b5a), arg=0x000000010085fe88, joinable=1, stk_size=8775960) at sched.c:616
   613 	            _st_thread_main();
   614 	        (thread)->context[0].__jmpbuf[8] = (long) (lsp);
   615 	    #else
-> 616 	        _ST_INIT_CONTEXT(thread, stack->sp, _st_thread_main);
   617 	    #endif
   618 	#else
   619 	    _ST_INIT_CONTEXT(thread, stack->sp, stack->bsp, _st_thread_main);
Target 0: (srs) stopped.
(lldb) 

@winlinvip winlinvip reopened this Nov 11, 2018
@winlinvip
Copy link
Member

Maybe macOS10.14 changed the setjmp and longjmp, so that we couldn't directly use it anymore:


    #define MD_STACK_GROWS_DOWN
    #define MD_USE_BSD_ANON_MMAP
    #define MD_ACCEPT_NB_INHERITED
    #define MD_ALWAYS_UNSERIALIZED_ACCEPT
    #define MD_HAVE_SOCKLEN_T

    #define MD_SETJMP(env) _setjmp(env)
    #define MD_LONGJMP(env, val) _longjmp(env, val)

    #if defined(__ppc__)
        #define MD_JB_SP  0
    #elif defined(__i386__)
        #define MD_JB_SP  9
    #elif defined(__x86_64__)
        #define MD_JB_SP  4
    #else
        #error Unknown CPU architecture
    #endif

    #define MD_INIT_CONTEXT(_thread, _sp, _main)   \
        ST_BEGIN_MACRO                               \
        if (MD_SETJMP((_thread)->context))           \
            _main();                                   \
        *((long *)&((_thread)->context[MD_JB_SP])) = (long) (_sp); \
        ST_END_MACRO

    #define MD_GET_UTIME()            \
        struct timeval tv;              \
        (void) gettimeofday(&tv, NULL); \
        return (tv.tv_sec * 1000000LL + tv.tv_usec)

@winlinvip
Copy link
Member

winlinvip commented Nov 11, 2018

Debugging setjmp information:

(lldb) p/x rsp0
(long) $2 = 0x00007fff9083c1a8
(lldb) register read rax rsp rbp r12 r13 r14 r15
     rax = 0x0000000000000000
     rsp = 0x00007ffeefbff670
     rbp = 0x00007ffeefbff7f0
     r12 = 0x0000000000000000
     r13 = 0x0000000000000000
     r14 = 0x0000000000000000
     r15 = 0x0000000000000000
(lldb) p/x context
(jmp_buf) $3 = {
  [0] = 0x00000000 // rflags
  [1] = 0x00000000 // rflags
  [2] = 0xdd08c782 // rip
  [3] = 0xc9d4c227 // rip
  [4] = 0xdd08c602 // rbp
  [5] = 0xc9d4c227 // rbp
  [6] = 0x00000000 // rsp
  [7] = 0x00000000 // rsp
  [8] = 0x00000000 // rbx
  [9] = 0x00000000 // rbx
  [10] = 0x00000000 // r12
  [11] = 0x00000000 // r12
  [12] = 0x00000000 // r13
  [13] = 0x00000000 // r13
  [14] = 0x32b73ca7 // r14
  [15] = 0xc9d4bdd8 // r14
  [16] = 0xefbff850 // r15
  [17] = 0x00007ffe // r15
  [18] = 0x00001f80 // mxcsr
  [19] = 0x0000037f // fp control word
  [20] = 0x00000000 // sigmask
  [21] = 0x00000000 // reserved 0
  [22] = 0x00000004 // reserved 1
  [23] = 0x00000000 // reserved 2
  [24] = 0x00000f00 // reserved 3
  [25] = 0x00000001 // reserved 4
  [26] = 0x00000000 // reserved 5
  [27] = 0x00000000 // reserved 6
  [28] = 0x00000004 // reserved 7
  [29] = 0x00000000 // reserved 8
  [30] = 0x00000008 // reserved 9
  [31] = 0x00000000 // reserved 10
  [32] = 0x00000010 // reserved 11
  [33] = 0x00000030 // reserved 12
  [34] = 0xefbff800 // reserved 13
  [35] = 0x00007ffe // reserved 14
  [36] = 0xefbff720 // reserved 15
#if defined(__x86_64__)
/*
 * _JBLEN is number of ints required to save the following:
 * rflags, rip, rbp, rsp, rbx, r12, r13, r14, r15... these are 8 bytes each
 * mxcsr, fp control word, sigmask... these are 4 bytes each
 * add 16 ints for future expansion needs...
 */
#define _JBLEN ((9 * 2) + 3 + 16)
typedef int jmp_buf[_JBLEN];

The layout seems not the right one, the rsp seems transformed then save to jmpbuf[4].

TRANS_BY_GPT3

@winlinvip
Copy link
Member

Need to rewrite the setjmp and longjmp for macOS 10.14.

@VincentHQL
Copy link

VincentHQL commented Nov 26, 2018

Need to rewrite the setjmp and longjmp for macOS 10.14.

Will it be supported in the future? Now that my Mac has upgraded to 10.14, it's quite troublesome to downgrade.

TRANS_BY_GPT3

@winlinvip

This comment has been minimized.

winlinvip added a commit that referenced this issue Dec 9, 2018
winlinvip added a commit that referenced this issue Dec 9, 2018
@hy05190134
Copy link

hy05190134 commented Jan 2, 2019

@winlinvip I also encountered the issue of SRS startup error. I searched and found this, can you see if it can be used? https://reviews.llvm.org/file/data/eofjd4jg7q4ootgneotu/PHID-FILE-7cotnhoqjf7xwhtaoxxh/D51064.diff However, I don't know how to recompile to make setjmp and longjmp effective.

TRANS_BY_GPT3

@zn123
Copy link

zn123 commented Mar 25, 2020

This problem needs to be solved, st is not working anymore.

TRANS_BY_GPT3

@winlinvip

This comment has been minimized.

@zn123
Copy link

zn123 commented Mar 25, 2020

Now, when compiling the st source code separately, I encountered the same problem with setjmp; the develop branch.

TRANS_BY_GPT3

@zn123
Copy link

zn123 commented Mar 25, 2020

    {
      if (setjmp((thread)->context))
         _st_thread_main(); <<========= Error Thread 1: EXC_BAD_INSTRUCTION (code=12, subcode=0x0)
      *((long *)&((thread)->context[4])) = (long) (stack->sp);
    }
    //_ST_INIT_CONTEXT(thread, stack->sp, _st_thread_main);

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Mar 28, 2020

Resupported OSX.

TRANS_BY_GPT3

winlinvip added a commit that referenced this issue Mar 28, 2020
@zn123
Copy link

zn123 commented Mar 31, 2020

牛逼' translates to 'awesome' in English.

TRANS_BY_GPT3

@harlanc
Copy link
Contributor

harlanc commented Aug 19, 2021

ld: symbol(s) not found for architecture i386. Has this issue been resolved? OS X version 11.5.2, Big Sur, SRS version 4.0. Will this problem still occur? @winlinvip, please provide an answer.

image

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Sep 11, 2021
@winlinvip winlinvip changed the title illegal hardware instruction osx10.14 Mojave OSX: illegal hardware instruction osx10.14 Mojave Sep 11, 2021
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

7 participants