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

issues compiling yi-hack-MStar in MacOSX 10.15.3 #2

Open
fjcabello opened this issue Apr 1, 2020 · 8 comments
Open

issues compiling yi-hack-MStar in MacOSX 10.15.3 #2

fjcabello opened this issue Apr 1, 2020 · 8 comments

Comments

@fjcabello
Copy link

Hi,

I have the docker image running and follow these steps:

  • Copy original home and rootfs partition files to ./stock_firmware/... (don't ask me where to find them).
  • git submodule update --init
  • ./scripts/init_sysroot.all.sh
  • ./scripts/compile.sh
  • ./scripts/pack_fw.all.sh

But compile.sh fails

`root@ba068e8a531e:/yi-hack-src/yi-hack-MStar# ./scripts/compile.sh


YI-HACK - SRC COMPILER

MOD_DIR: /yi-hack-src/yi-hack-MStar/src/busybox
MOD_NAME: busybox
MOD_INIT: init.busybox
MOD_COMPILE: compile.busybox
MOD_INSTALL: install.busybox

Initializing busybox...

HEAD is now at b84194b13 Bump version to 1.29.3
Compiling busybox...

HOSTCC scripts/basic/split-include
scripts/basic/split-include.c: In function ‘main’:
scripts/basic/split-include.c:134:6: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
134 | fgets(old_line, buffer_size, fp_target);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fixdep: /usr/include/i386-linux-gn: No such file or directory
make[2]: *** [scripts/Makefile.host:104: scripts/basic/split-include] Error 2
make[1]: *** [/yi-hack-src/yi-hack-MStar/src/busybox/busybox/Makefile:357: scripts_basic] Error 2
make: *** [Makefile:522: include/autoconf.h] Error 2`

Any ideas?

Thanks

@borodiliz
Copy link
Owner

Related with roleoroleo/yi-hack-MStar#133

@fjcabello can't simulate your problem. Probably not related but this is my absolute path for busybox:

MOD_DIR:        /yi-hack-src/src/busybox

What's your output for uname -a (on both host and docker container) ?

@fjcabello
Copy link
Author

Hi,

$ uname -a
Linux ba068e8a531e 4.14.131-linuxkit #1 SMP Fri Jul 19 12:31:17 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

And my laptop:
$ uname -a
$ uname -a
Darwin MacBook-Pro-de-Francisco.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

Thanks!

Paco

@fjcabello
Copy link
Author

Hi,
I tried to put source code under /yi-hack-src, so now
MOD_DIR: /yi-hack-src/src/busybox
but it's not making any difference. I got the same error :(

Thanks!

@fjcabello fjcabello changed the title issues compiling yi-hack-MStar issues compiling yi-hack-MStar in MacOSX 10.15.3 Apr 3, 2020
@fjcabello
Copy link
Author

Issue is due to MacOSX. I tried in Ubuntu and it's working.

Only an issue with onvif
Trying to download https://www.openssl.org/source/openssl-1.0.2u.tar.gz
but openssl moved that version to:
https://www.openssl.org/source/old/openssl-1.0.2u.tar.gz

@borodiliz
Copy link
Owner

borodiliz commented Apr 3, 2020

@fjcabello my environment is also MacOS (Catalina 10.15.4). I have had no trouble building on 2019 iMac or 2018 MacBook Pro

➜  ~ uname -a
Darwin iMac.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
➜  ~ docker --version
Docker version 19.03.8, build afacb8b

Regarding the openssl download issue it is due to https://github.com/roleoroleo/yi-hack-MStar/blob/623feb7bdbcdedab5475d92c084fc7a5a9825a91/src/onvif_srvd/Makefile.onvif_srvd#L289 . @roleoroleo will appreciate if you make a pull request

@roleoroleo
Copy link

I will update in the next release.

@fjcabello
Copy link
Author

Strange, Strange...
following the problem I realized that busybox fails in a internal binary call fixdep.c.
Adding some traces the problems is in a fstat call and the error is 'fstat: Value too large for defined data type'. This error appears when you are in 64bit architectures but binary is compiled with 32bit support.

Do you know if ARM arch of the camera is 32bit or 64bit?

Any idea? The only 'uncommon' thing of my Mac is that the filesystem is encrypted with FileVault. Not sure if this is making any impact because I'm sharing a folder with Docker... I don't think so.

No more ideas right now. I'll continue tomorrow. If I can't find it I will compile run docker container in Ubuntu.

@borodiliz
Copy link
Owner

borodiliz commented Apr 4, 2020 via email

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

3 participants