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

Cannot compile on centos 7 #34

Closed
mciricean opened this issue Aug 30, 2022 · 3 comments
Closed

Cannot compile on centos 7 #34

mciricean opened this issue Aug 30, 2022 · 3 comments

Comments

@mciricean
Copy link

works fine on v0.1.3 bit not with v0.1.4 or above

centos:7.9.2009 in docker
GOVERSION="go1.18.5"

# github.com/gen2brain/go-unarr/unarrc
	In file included from /go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/common_crc32.go:4:0:
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c: In function 'ar_crc32':
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:25:9: error: 'for' loop initial declarations are only allowed in C99 mode
	         for (unsigned int i = 128; i; i >>= 1) {
	         ^
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:25:9: note: use option -std=c99 or -std=gnu99 to compile your code
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:27:13: error: 'for' loop initial declarations are only allowed in C99 mode
	             for (unsigned int j = 0; j < 256; j += 2 * i) {
	             ^
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:32:27: error: redefinition of 'i'
	         for (unsigned int i = 0; i < 256; i++) {
	                           ^
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:25:27: note: previous definition of 'i' was here
	         for (unsigned int i = 128; i; i >>= 1) {
	                           ^
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:32:9: error: 'for' loop initial declarations are only allowed in C99 mode
	         for (unsigned int i = 0; i < 256; i++) {
	         ^
	/go/pkg/mod/github.com/gen2brain/[email protected]/unarrc/external/unarr/common/crc32.c:33:13: error: 'for' loop initial declarations are only allowed in C99 mode
	             for (unsigned int j = 1; j < 8; j++) {
	             ^
gen2brain added a commit that referenced this issue Aug 30, 2022
@gen2brain
Copy link
Owner

Can you check again with c496c96?

@mciricean
Copy link
Author

looks good, no compilation issue

@gen2brain
Copy link
Owner

Ok, thanks for reporting.

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