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

go install error #41

Closed
qq516249940 opened this issue Apr 23, 2024 · 8 comments
Closed

go install error #41

qq516249940 opened this issue Apr 23, 2024 · 8 comments

Comments

@qq516249940
Copy link

qq516249940 commented Apr 23, 2024

centos7.9
go version go1.22.2 linux/amd64

$ go install github.com/gen2brain/go-unarr/cmd/unarr@latest

go: downloading github.com/gen2brain/go-unarr v0.2.0
# github.com/gen2brain/go-unarr/unarrc
In file included from /opt/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/bzip2_bzlib.go:4:0:
/opt/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/bzip2/bzlib.c: In function ‘bzopen_or_bzdopen’:
/opt/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/bzip2/bzlib.c:1431:7: warning: implicit declaration of function ‘fdopen’ [-Wimplicit-function-declaration]
       fp = fdopen(fd,mode2);
       ^
/opt/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/bzip2/bzlib.c:1431:10: warning: assignment makes pointer from integer without a cast [enabled by default]
       fp = fdopen(fd,mode2);
          ^
cgo-gcc-prolog: At top level:
cc1: warning: unrecognized command line option "-Wno-typedef-redefinition" [enabled by default]
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
@gen2brain
Copy link
Owner

If you are using an ancient compiler, that can be an issue. But, you didn't post an error, those are just warnings, what is the exact error?

gen2brain added a commit that referenced this issue Apr 23, 2024
@gen2brain
Copy link
Owner

I pushed some fixes to silence warnings. Can you please test, just replace @latest with @master.

@qq516249940
Copy link
Author

If you are using an ancient compiler, that can be an issue. But, you didn't post an error, those are just warnings, what is the exact error?

Just a warning,I find unarr at $GOPATH position.thanks!
but,I use it.RAR 5 format isn't supported

$ ./unarr  /tmp/dist.rar  /tmp/
! rar.c:214: RAR 5 format isn't supported
error: unarr: no valid RAR, ZIP, 7Z or TAR archive
$  file /tmp/dist.rar 
/tmp/dist.rar: RAR archive data, v80, flags: Archive volume, Commented, Locked, Solid,

@gen2brain
Copy link
Owner

That is not an issue with this repo, see selmf/unarr#3. I did not understand though, do you still have warnings after 13f578c?

@qq516249940
Copy link
Author

master.

[root@polo bin]# ll
total 2536
-rwxr-xr-x 1 root root 2594056 Apr 23 11:38 unarr
[root@polo bin]# go install github.com/gen2brain/go-unarr/cmd/unarr@latest
^C
[root@polo bin]# go install github.com/gen2brain/go-unarr/cmd/unarr@master
go: downloading github.com/gen2brain/go-unarr v0.2.1-0.20240423063020-a12a3a02b177
[root@polo bin]# ll
total 2508
-rwxr-xr-x 1 root root 2566880 Apr 23 14:39 unarr

@master. test is ok.

@qq516249940
Copy link
Author

That is not an issue with this repo, see selmf/unarr#3. I did not understand though, do you still have warnings after 13f578c?

go install github.com/gen2brain/go-unarr/cmd/unarr@master,then I run command:
no warning: " ! rar.c:214: RAR 5 format isn't supported"

[root@polo bin]# ./unarr  /tmp/dist.rar  /tmp/
error: unarr: no valid RAR, ZIP, 7Z or TAR archive

@gen2brain
Copy link
Owner

OK, that is as intended, the library should not spam with warnings. Thanks for reporting, will tag this later as 0.2.1.

@gen2brain
Copy link
Owner

Note that if you want to see the warnings and debug messages you can build with -tags debug.

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