zoukankan      html  css  js  c++  java
  • 安装sasquatch的时候unsquashfs.c报错解决

    首先安装依赖并下载

    sudo apt-get install build-essential liblzma-dev liblzo2-dev zlib1g-dev
    git clone https://github.com/devttys0/sasquatch.git

    下载完尝试执行build脚本,结果报错

    cc -g -O2  -I. -I./LZMA/lzma465/C -I./LZMA/lzmalt -I./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT="gzip" -Wall -Werror  -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DLZO_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT   -c -o unsquashfs.o unsquashfs.c
    unsquashfs.c: In function ‘create_inode’:
    unsquashfs.c:1140:13: error: In the GNU C Library, "makedev" is defined
     by <sys/sysmacros.h>. For historical compatibility, it is
     currently defined by <sys/types.h> as well, but we plan to
     remove this soon. To use "makedev", include <sys/sysmacros.h>
     directly. If you did not intend to use a system-defined macro
     "makedev", you should undefine it after including <sys/types.h>. [-Werror]
           i->data & 0xff)) == -1) {
                 ^~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                                                                           
    cc1: all warnings being treated as errors
    <builtin>: recipe for target 'unsquashfs.o' failed
    make: *** [unsquashfs.o] Error 1

    跟着指引,就在unsquashfs.c文件前面加个include

    ~/tools/sasquatch/squashfs4.3/squashfs-tools$ sudo make && sudo make install
    cc -g -O2  -I. -I./LZMA/lzma465/C -I./LZMA/lzmalt -I./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT="gzip" -Wall -Werror  -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DLZO_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT   -c -o unsquashfs.o unsquashfs.c
    cc -g -O2  -I. -I./LZMA/lzma465/C -I./LZMA/lzmalt -I./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT="gzip" -Wall -Werror  -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DLZO_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT   -c -o unsquash-1.o unsquash-1.c
    cc -g -O2  -I. -I./LZMA/lzma465/C -I./LZMA/lzmalt -I./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT="gzip" -Wall -Werror  -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DLZO_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT   -c -o unsquash-2.o unsquash-2.c
    。。。。。。
    。。。。。。
    。。。。。。
    g++   ./LZMA/lzmalt/*.o unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o compressor.o unsquashfs_info.o gzip_wrapper.o lzma_wrapper.o ./LZMA/lzma465/C/Alloc.o ./LZMA/lzma465/C/LzFind.o ./LZMA/lzma465/C/LzmaDec.o ./LZMA/lzma465/C/LzmaEnc.o ./LZMA/lzma465/C/LzmaLib.o xz_wrapper.o lzo_wrapper.o read_xattrs.o unsquashfs_xattr.o -lpthread -lm -lz -L./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -llzmalib  -llzma  -llzo2 -o sasquatch
    mkdir -p /usr/local/bin
    cp sasquatch /usr/local/bin
  • 相关阅读:
    融云技术分享:全面揭秘亿级IM消息的可靠投递机制
    企业微信的IM架构设计揭秘:消息模型、万人群、已读回执、消息撤回等
    喜马拉雅亿级用户量的离线消息推送系统架构设计实践
    uni-app 项目使用 npm 包中的小程序自定义组件
    Leetcode563. 二叉树的坡度
    vue看源码遇到 报错
    windows使用
    mysql 显示行号
    从优秀到卓越
    【面经】阿里蚂蚁金服22秋招-Java后端
  • 原文地址:https://www.cnblogs.com/cnsec/p/13286492.html
Copyright © 2011-2022 走看看