-
Notifications
You must be signed in to change notification settings - Fork 60
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
Failed to compile in FreeBSD 10.3 i386 #1
Comments
I don't get this error, but I find a similar problem with OpenBSD 6.0 amd64. The C compiler sees two copies of <machine/_types.h>. This happens because we run cpp twice. We run cpp before yacc, and then cc runs cpp as usual when compiling y.tab.c from yacc. The source file mach/proto/as/comm2.y has Now comm2.y does The file obj/plat/linuxppc/as/yacc/yaccinput/comm2.y is the output of the first cpp. I can see that all typedefs from <machine/_types.h> and <stdint.h> have been copied to the yacc input. The OpenBSD declares __mbstate_t in <sys/_types.h>, but luckily for me, <stdint.h> never includes <sys/_types.h>, so I never get the error of two __mbstate_t declarations. |
See issue davidgiven#1 (davidgiven#1). The file mach/proto/as/comm2.y goes through cpp twice. The _include macro, defined in comm2.y and used in comm0.h, delays the inclusion of system header files. The inclusion of <stdint.h> wasn't delayed. This caused multiple inclusions of <sys/_types.h> in FreeBSD and <machine/_types.h> in OpenBSD. Use _include to delay <stdint.h>. Also use _include for "arch.h" and "out.h", because h/out.h includes <stdint.h> and h/arch.h might include it in the future. Sort the system includes in comm0.h by moving them up to be with <stdint.h>. Must include <stdint.h> before "mach0.c", because mach/powerpc/as/mach0.c needs it. Must include "mach0.c" before checking ASLD.
With the fix in #44, compliation in FreeBSD can proceed further, but still failed with following error:
|
We should not include a system header file here, because mach/proto/as/comm2.y goes through cpp twice. The include can cause problems like davidgiven#1 Remove this include #<stdbool.h> and leave a comment pointing to the includes in comm0.h. Change the few instances of bool, false, true, to int, 0, 1.
@dram reported a build failure in FreeBSD at davidgiven#1 (comment) Linux manual for getopt(3) says: > If the first character of optstring is '-', then each nonoption > argv-element is handled as if it were the argument of an option with > character code 1.... > > The use of '+' and '-' in optstring is a GNU extension. GNU/Linux and OpenBSD handle '-' in this special way, but FreeBSD seems not to. If '-' is not special, then em_ego can't find its input file, so the build must fail. This commit stops using '-' in both em_b and em_ego, but doesn't change mcg. Also fix em_ego -O3 to not act like -O4.
Compile ack
default
branch in FreeBSD 10.3 i386 failed with following error:The text was updated successfully, but these errors were encountered: