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

Build failure with gcc-9.1.0 #1315

Closed
floppym opened this issue May 22, 2019 · 6 comments
Closed

Build failure with gcc-9.1.0 #1315

floppym opened this issue May 22, 2019 · 6 comments
Assignees

Comments

@floppym
Copy link
Contributor

floppym commented May 22, 2019

Description of problem:
Building ksh with gcc-9.1.0 on Gentoo Linux fails.

Ksh version:
5d692ea

Build log attached.
build.log

@krader1961
Copy link
Contributor

The build failure is because the src/lib/libast/comp/conf.sh script failed to do the right thing. Of the four Linux systems I use to do builds the newest gcc is 8.3. Take a look at the build/meson-logs/meson-log.txt log file. Search for the first mention of conf.sh. What follows is the execution of that script as it constructs the conftab.c module. Somewhere in those log entries you'll undoubtedly find some gcc errors. If you're not comfortable with wading through that log file to figure out what we need to do to adapt the build to gcc 9.1 just attach it to this issue.

@floppym
Copy link
Contributor Author

floppym commented May 22, 2019

Attaching meson-log.txt.

meson-log.txt.gz

@floppym
Copy link
Contributor Author

floppym commented May 22, 2019

With gcc-8.3, I see many errors like this:

+ cc -std=gnu99 -D_BLD_DLL -I/home/floppym/src/ast/build2 -I/home/floppym/src/ast/src/lib/libast/inc
lude -I/home/floppym/src/ast/src/lib/libast/features -I/home/floppym/src/ast/src/cmd/std -o /tmp/ksh
.2eloJm/conf.exe /tmp/ksh.2eloJm/conf.c
/tmp/ksh.2eloJm/conf.c: In function 'main':
/tmp/ksh.2eloJm/conf.c:20:49: error: 'ABI_AIO_XFER_MAX' undeclared (first use in this function); did you mean 'AIO_PRIO_DELTA_MAX'?
         printf("%lu\n", (unsigned _ast_intmax_t)ABI_AIO_XFER_MAX);
                                                 ^~~~~~~~~~~~~~~~
                                                 AIO_PRIO_DELTA_MAX
/tmp/ksh.2eloJm/conf.c:20:49: note: each undeclared identifier is reported only once for each function it appears in

With gcc-9.1, these errors are missing in the log.

@krader1961
Copy link
Contributor

I hate the conf.sh script. With gcc 8 and older (and clang) the output of the $cc -E $tmp.c near line 800 looks (in part) like this:

conf "ARG_MAX" = (256 * 1024)
conf "BC_BASE_MAX" = 99

Here is what the same section of the compiler output looks like with gcc 9:

conf "AIO_LISTIO_MAX" = AIO_LISTIO_MAX
conf "AIO_MAX" = AIO_MAX
conf "AIO_PRIO_DELTA_MAX" = AIO_PRIO_DELTA_MAX
conf "ALLOC_SIZE_MIN" = ALLOC_SIZE_MIN
conf "ARG_MAX" =
# 21 "/var/folders/6t/t624jkmx7cbb9t35vzvjwj180000gn/T/ksh.XXXXXX.f6n87zfJ/conf.c" 3 4
                (256 * 1024)

# 22 "/var/folders/6t/t624jkmx7cbb9t35vzvjwj180000gn/T/ksh.XXXXXX.f6n87zfJ/conf.c"
conf "ATEXIT_MAX" = ATEXIT_MAX
conf "BC_BASE_MAX" =
# 23 "/var/folders/6t/t624jkmx7cbb9t35vzvjwj180000gn/T/ksh.XXXXXX.f6n87zfJ/conf.c" 3 4
                    99

@krader1961
Copy link
Contributor

I think it's time to bite the bullet and eliminate the src/lib/libast/comp/conf.sh script. See #1118.

@krader1961
Copy link
Contributor

@floppym You should be able to build ksh using PR #1316.

I spent several hours trying make the conf.sh script compatible with gcc 9.1 without success. I don't think it's possible without a major rewrite of that script. Which cannot be justified since we intend to remove the getconf builtin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants