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

fedi2edi cannot compile in cygwin #46

Closed
andimik opened this issue Oct 16, 2021 · 2 comments
Closed

fedi2edi cannot compile in cygwin #46

andimik opened this issue Oct 16, 2021 · 2 comments

Comments

@andimik
Copy link
Collaborator

andimik commented Oct 16, 2021

Today I tried to compile eti-tools in cygwin. But it fails:

cc -O2 -Wall -I. -c -o edi2eti.o edi2eti.c
cc -o edi2eti network.o af_parser.o pf_parser.o tag_parser.o crc.o eti_assembler.o logging.o edi2eti.o -lm
cc -O2 -Wall -I. -c -o fedi2eti.o fedi2eti.c
In file included from /usr/include/sys/fcntl.h:3,
                 from /usr/include/fcntl.h:12,
                 from fedi2eti.c:22:
edi_parser.h:109:14: error: expected identifier or '(' before numeric constant
  109 |     uint32_t FSYNC:24;
      |              ^~~~~
In file included from fedi2eti.c:29:
edi_parser.h:110:1: warning: no semicolon at end of struct or union
  110 | } PACKED;
      | ^
make: *** [Makefile:39: fedi2eti.o] Error 1

Any idea? This error does not appear in Linux.

@richard-gravy
Copy link

A quick stab at the issue, but I think "FSYNC" may already be defined in Cygwin gcc's internals somewhere, for compatibility with other software.

Try changing the name of the variable to something that you can guarantee won't have already been used, like uint32_t FHEEHOOHAH:24;.

If that works, then a precompile check for Cygwin and undef of the name may be necessary, or just change its name for all targets.

@andimik
Copy link
Collaborator Author

andimik commented Nov 28, 2021

Well, I'm giving up and have switched to WSL2 Linux Sub System in Windows 11.

Because the compiled files won't start due to wrong architecture ...

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