GangZhuo / BaiduPCS

百度网盘命令行工具。The terminal utility for Baidu Network Disk.
Other
3.5k stars 720 forks source link

openwrt cross compile error #211

Open gmuskie opened 7 years ago

gmuskie commented 7 years ago

Basically I have the same issue as #160. I had applied the patch ("https://github.com/giveup/rtndev/blob/master/baidupcs/patches/010-compiler-flags.patch" that mentioned in there), rename the Makefile.old to Makefile , compile it ( make V=99 package/BaiduPCS/openwrt/compile ). And I got these error:

################ pcs/utf8.c:31:14: error: unknown type name 'u_int32_t' static const u_int32_t offsetsFromUTF8[6] = { ^ pcs/utf8.c: In function 'u8_toucs': pcs/utf8.c:65:5: error: unknown type name 'u_int32_t' u_int32_t ch; ^ pcs/utf8.c: In function 'u8_toutf8': pcs/utf8.c:140:5: error: unknown type name 'u_int32_t' u_int32_t ch; ^ pcs/utf8.c:145:15: error: 'u_int32_t' undeclared (first use in this function) ch = (u_int32_t)src[i]; ..... make[4]: [pcs/utf8.lo] Error 1 make[4]: Leaving directory `/home/muskie/Downloads/openwrt_sdk/build_dir/target-arm_xscale_musl-1.1.16_eabi/BaiduPCS-0.2.6' make[3]: [all] Error 2 make[3]: Leaving directory /home/muskie/Downloads/openwrt_sdk/build_dir/target-arm_xscale_musl-1.1.16_eabi/BaiduPCS-0.2.6' make[2]: *** [/home/muskie/Downloads/openwrt_sdk/build_dir/target-arm_xscale_musl-1.1.16_eabi/BaiduPCS-0.2.6/.built] Error 2 make[2]: Leaving directory/home/muskie/Downloads/openwrt_sdk/package/BaiduPCS/openwrt' make[1]: [package/BaiduPCS/openwrt/compile] Error 2 make[1]: Leaving directory `/home/muskie/Downloads/openwrt_sdk' make: [package/BaiduPCS/openwrt/compile] Error 2 #########

GangZhuo commented 7 years ago

master 中的编译过程,可能有问题。你可以 "git checkout be9735" 后试看看。

gmuskie commented 7 years ago

Thanks for the prompt reply.

Here is the result after ran "git checkout be9735":

Note: checking out 'be9735'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at be97351... fix stack smashing detected

Then, I used "make V=99 package/BaiduPCS/openwrt/compile" to compile again (I tried both with and without the Makefile patch - "https://github.com/giveup/rtndev/blob/master/baidupcs/patches/010-compiler-flags.patch" ) and got the same problem (pcs/utf8.c:31:14: error: unknown type name 'u_int32_t') that mentioned in my first post.