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

macOS:#include "external/unarr/_7z/_7z.c" #36

Closed
hktalent opened this issue Dec 4, 2022 · 6 comments
Closed

macOS:#include "external/unarr/_7z/_7z.c" #36

hktalent opened this issue Dec 4, 2022 · 6 comments

Comments

@hktalent
Copy link

hktalent commented Dec 4, 2022

GOROOT=/usr/local/Cellar/[email protected]/1.18.6/libexec #gosetup
GOPATH=/Users/51pwn/go #gosetup
/usr/local/Cellar/[email protected]/1.18.6/libexec/bin/go build -o /private/var/folders/_l/pnb2t_9s0f192bqlz1348vpr0000gn/T/GoLand/___go_build_github_com_hktalent_51pwnPlatform_pkg_blevExp_sky -gcflags all=-N -l github.com/hktalent/51pwnPlatform/pkg/blevExp/sky #gosetup
# github.com/gen2brain/go-unarr/unarrc
../../../vendor/github.com/gen2brain/go-unarr/unarrc/7z_7z.go:4:10: fatal error: 'external/unarr/_7z/_7z.c' file not found
#include "external/unarr/_7z/_7z.c"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
@gen2brain
Copy link
Owner

Do not use vendoring, it will copy only Go files.

@hktalent
Copy link
Author

hktalent commented Dec 4, 2022

@gen2brain
I can confirm it is 7zfile, but the file has 444G

In file included from ../../unarrc/zip_parse-zip.go:4:
In file included from ../../unarrc/external/unarr/zip/parse-zip.c:4:
In file included from ../../unarrc/external/unarr/zip/zip.h:19:
In file included from ../../unarrc/external/unarr/zip/../lzmasdk/LzmaDec.h:7:
../../unarrc/external/unarr/zip/../lzmasdk/7zTypes.h:171:23: warning: redefinition of typedef 'Byte' is a C11 feature [-Wtypedef-redefinition]
../../unarrc/external/zlib/zconf.h:391:24: note: previous definition is here
# github.com/hktalent/51pwnPlatform/pkg/unarrc
In file included from ../../unarrc/zip_uncompress-zip.go:4:
In file included from ../../unarrc/external/unarr/zip/uncompress-zip.c:4:
In file included from ../../unarrc/external/unarr/zip/zip.h:19:
In file included from ../../unarrc/external/unarr/zip/../lzmasdk/LzmaDec.h:7:
../../unarrc/external/unarr/zip/../lzmasdk/7zTypes.h:171:23: warning: redefinition of typedef 'Byte' is a C11 feature [-Wtypedef-redefinition]
../../unarrc/external/zlib/zconf.h:391:24: note: previous definition is here
# github.com/hktalent/51pwnPlatform/pkg/unarrc
In file included from ../../unarrc/zip_zip.go:4:
In file included from ../../unarrc/external/unarr/zip/zip.c:4:
In file included from ../../unarrc/external/unarr/zip/zip.h:19:
In file included from ../../unarrc/external/unarr/zip/../lzmasdk/LzmaDec.h:7:
../../unarrc/external/unarr/zip/../lzmasdk/7zTypes.h:171:23: warning: redefinition of typedef 'Byte' is a C11 feature [-Wtypedef-redefinition]
../../unarrc/external/zlib/zconf.h:391:24: note: previous definition is here

! _7z.c:187: Invalid 7z archive (failed with error 11)
panic: unarr: No valid RAR, ZIP, 7Z or TAR archive

@hktalent
Copy link
Author

hktalent commented Dec 5, 2022

$ file "xxx_dump.7z"
xxx_dump.7z: 7-zip archive data, version 0.4

@gen2brain
Copy link
Owner

@hktalent That is now a new issue after you removed the vendoring, right? If you can unpack with the https://github.com/selmf/unarr test program then probably something can be done here to fix the issue. If it is the same then better open an issue there, these are just the bindings.

@gen2brain gen2brain reopened this Dec 5, 2022
@gen2brain
Copy link
Owner

There was this issue selmf/unarr#25, but that one is fixed.

@hktalent
Copy link
Author

hktalent commented Dec 5, 2022

#cgo amd64 arm64 arm64be loong64 mips64 mips64le ppc64 ppc64le riscv64 s390x sparc64 CFLAGS: -D_FILE_OFFSET_BITS=64
image
same error, in goland debug

@hktalent hktalent closed this as completed Dec 9, 2022
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

2 participants