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

k0.8.8编译so失败 #4041

Closed
CarGuo opened this issue Feb 22, 2018 · 12 comments
Closed

k0.8.8编译so失败 #4041

CarGuo opened this issue Feb 22, 2018 · 12 comments

Comments

@CarGuo
Copy link

CarGuo commented Feb 22, 2018

mac

./compile-openssl.sh all
./compile-ffmpeg.sh all

出现如下图问题
wechatimg54

@raymond1012
Copy link
Member

init_android.sh and init-android-openssl.sh

@CarGuo
Copy link
Author

CarGuo commented Feb 23, 2018

init_android.sh and init-android-openssl.sh已经执行了

@raymond1012
Copy link
Member

raymond1012 commented Feb 23, 2018 via email

@CarGuo
Copy link
Author

CarGuo commented Feb 23, 2018

我使用 module-lite-hevc.sh 配置会有这个问题,默认module.sh不会,请问下是什么问题???为什么 会没有 module-lite-hevc.sh 会没有 --disable-linux-perf,而 module-lite.sh有

@CarGuo
Copy link
Author

CarGuo commented Feb 23, 2018

是否module-lite-hevc.sh不再维护,而使用module-lite.sh了?

@ma969070578
Copy link

还原默认的config

@deidaraz
Copy link

deidaraz commented Aug 1, 2018

@CarGuo 请问这个问题你是怎么解决的

@baishuai
Copy link

baishuai commented Aug 1, 2018

@cloundhub --disable-linux-perf 应该是这个吧

@deidaraz
Copy link

deidaraz commented Aug 1, 2018

@CarGuo 我编译的时候和你上面图一样的错误
./libavutil/timer.h:38:31: fatal error: linux/perf_event.h: No such file or directory
请问你是怎么解决的

@deidaraz
Copy link

deidaraz commented Aug 1, 2018

@baishuai
./libavutil/timer.h:38:31: fatal error: linux/perf_event.h: No such file or directory
请问你是怎么解决的

@leonck
Copy link

leonck commented Sep 5, 2018

module-default.sh module-lite-hevc.sh都会出现这个错误,但是用module-lite.sh就没问题

@oncealong
Copy link

因为是macos, 没有linux的相关文件. 在libavutil/timer.h中有如下代码:

#if CONFIG_LINUX_PERF
# ifndef _GNU_SOURCE
#  define _GNU_SOURCE
# endif
# include <unistd.h> // read(3)
# include <sys/ioctl.h>
# include <asm/unistd.h>
# include <linux/perf_event.h>
#endif

可以看到, 如果定义了CONFIG_LINUX_PERF, 就会引入linux/perf_event.h头文件. 但是macos又没有这个头文件, 就会报错.
解决办法是在module.sh对应的sh里增加下面语句.

export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-linux-perf"
export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bzlib"

如果编译还是提示fatal error: linux/perf_event.h: No such file or directory, 尝试hardcode改下:

  1. ffmpeg根目录下打开config.h, 搜perf, 将CONFIG_LINUX_PERF定义为0.
#define CONFIG_LINUX_PERF 0
  1. ffmpeg/ffbuild/config.mak, 搜perf, 在CONFIG_LINUX_PERF前加!
!CONFIG_LINUX_PERF=yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants