Discussion:
arm64 stable/13 buildworld stops in bc
(too old to reply)
Mark Millard via freebsd-stable
2021-06-26 04:58:52 UTC
Permalink
From: Matthew Grooms <mgrooms_at_shrew.net> wrote on
Date: Fri, 25 Jun 2021 21:30:14 -0500 :

. . .
I've been trying to build stable/13 kernel & world periodically for
arm64 and either I'm not having very much luck or it's broken more times
than it compiles. Is there an automated process that's checking builds
for that platform?
Most recently, world stops building with bc ( see below ). However, that
looks like that was last touched on June 1st. Has the build really been
broken since then? :/
--- all_subdir_usr.bin ---
/usr/src/contrib/bc/src/program.c:515:28: error: too few arguments to
function call, expected 3, have 2
bc_file_puts(&vm.fout, str);
~~~~~~~~~~~~ ^
. . .

Well,

- bc_file_puts(&vm.fout, str);
+ bc_file_puts(&vm.fout, bc_flush_save, str);

happend on main at:


author Stefan Eßer <***@FreeBSD.org> 2021-04-06 08:44:52 +0000
committer Stefan Eßer <***@FreeBSD.org> 2021-04-06 08:44:52 +0000
commit 7a590c074ceede12b2b6e794f8703d6fa5749918 (patch)
tree 5d73533c45895d17bdc2a759755ac6a34c477a3b /src/program.c
parent 893ecb52db5ed47d6c1e8698334d34e0df651612 (diff)
download src-7a590c074ceede12b2b6e794f8703d6fa5749918.tar.gz
src-7a590c074ceede12b2b6e794f8703d6fa5749918.zip
Vendor import of Gavin D. Howard's bc version 4.0.0vendor/bc/4.0.0
Diffstat (limited to 'src/program.c')
-rw-r--r-- src/program.c 36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/program.c b/src/program.c
index 6ab794736f79..82735083bd03 100644
--- a/src/program.c
+++ b/src/program.c


and on stable/13 at:


author Stefan Eßer <***@FreeBSD.org> 2021-04-06 08:44:52 +0000
committer Stefan Eßer <***@FreeBSD.org> 2021-04-10 14:18:50 +0000
commit 0ca6ce5e976a045ab1e81ec3469957a64f15ab12 (patch)
tree 284f16319f560883110f93f7be7e6526d3a84097 /contrib/bc/src/program.c
parent 8393e034dacec0bbafdd470c3cceaecc693357ea (diff)
download src-0ca6ce5e976a045ab1e81ec3469957a64f15ab12.tar.gz
src-0ca6ce5e976a045ab1e81ec3469957a64f15ab12.zip
[bc] Update to version 4.0.0
This version fixes an issue (missing pop of top-of-stack value in the
"P" command of the dc program).

This issue did not affect the bc program, since it does not use dc as
an back-end to actually perform the calculations as was the case with
the traditional bc and dc programs.

The major number has been bumped due to Windows support that has been
added to this version. It does not correspond to a major change that
might affect FreeBSD.

(cherry picked from commit b55a927bc884d7780d65a508572023b0dc2dede9)

Diffstat (limited to 'contrib/bc/src/program.c')
-rw-r--r-- contrib/bc/src/program.c 36
1 files changed, 21 insertions, 15 deletions
diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c
index 6ab794736f79..82735083bd03 100644
--- a/contrib/bc/src/program.c
+++ b/contrib/bc/src/program.c


Looks likes you need to get your source code updated to
accurately match some specific commit.

I did not investigate anything beyond the example difference
above.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Stefan Esser
2021-06-26 05:20:21 UTC
Permalink
Hi All,
I've been trying to build stable/13 kernel & world periodically for arm64 and
either I'm not having very much luck or it's broken more times than it
compiles. Is there an automated process that's checking builds for that platform?
Hi Matthew,

there automated CI tests for all supported platforms, and if bc had failed
to build there, I'd have been informed.
Most recently, world stops building with bc ( see below ). However, that looks
like that was last touched on June 1st. Has the build really been broken since
then? :/
Not for me ...
--- all_subdir_usr.bin ---
/usr/src/contrib/bc/src/program.c:515:28: error: too few arguments to function
call, expected 3, have 2
        bc_file_puts(&vm.fout, str);
        ~~~~~~~~~~~~              ^
/usr/src/contrib/bc/include/file.h:81:6: note: 'bc_file_puts' declared here
void bc_file_puts(BcFile *restrict f, BcFlushType type, const char *str);
     ^
This looks to me like the result of an incomplete update of the sources.

History editing has been added a few releases back and the function signature
of bc_files_puts has been changed to take 3 instead of 2 arguments.

It looks like you got a mismatch between this header and the callers of this
function. Specifically, line 515 mentioned in the error message above is line
517 in up-to.date sources and reads:

bc_file_puts(&vm.fout, bc_flush_save, str);

Definitely 3 parameters there ...

See https://cgit.freebsd.org/src/tree/contrib/bc/src/program.c?h=stable/13#n512
line 517 - that's what your program.c should look like ...
/usr/src/contrib/bc/src/program.c:529:21: error: too few arguments to function
call, expected 2, have 1
                bc_vm_putchar('\0');
                ~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
     ^
/usr/src/contrib/bc/src/program.c:552:23: error: too few arguments to function
call, expected 2, have 1
                                bc_vm_putchar('\\');
                                ~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
     ^
/usr/src/contrib/bc/src/program.c:556:18: error: too few arguments to function
call, expected 2, have 1
                bc_vm_putchar(c);
                ~~~~~~~~~~~~~  ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
     ^
/usr/src/contrib/bc/src/program.c:601:25: error: too few arguments to function
call, expected 2, have 1
                bc_file_flush(&vm.fout);
                ~~~~~~~~~~~~~         ^
/usr/src/contrib/bc/include/file.h:76:6: note: 'bc_file_flush' declared here
void bc_file_flush(BcFile *restrict f, BcFlushType type);
     ^
/usr/src/contrib/bc/src/program.c:607:49: error: too few arguments to function
call, expected 2, have 1
                        if (inst == BC_INST_PRINT) bc_vm_putchar('\n');
~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
All the other error messages do point at a mix of source files from before
and after introduction of the history feature, too ...

The line numbers in your version of program.c seem to be off, compared to
the current sources, e.g. check out lines 609 and 610 on the above given URL
for the correct sources that correspond to that last error message.

Update your sources to a consistent state and your issue should be resolved.

Let me know if there are any further problems with this program.

Regards, STefan
Stefan Esser
2021-06-26 10:20:25 UTC
Permalink
Post by Stefan Esser
Hi All,
I've been trying to build stable/13 kernel & world periodically for arm64 and
either I'm not having very much luck or it's broken more times than it
compiles. Is there an automated process that's checking builds for that platform?
Hi Matthew,
there automated CI tests for all supported platforms, and if bc had failed
to build there, I'd have been informed.
Most recently, world stops building with bc ( see below ). However, that looks
like that was last touched on June 1st. Has the build really been broken since
then? :/
Not for me ...
--- all_subdir_usr.bin ---
/usr/src/contrib/bc/src/program.c:515:28: error: too few arguments to function
call, expected 3, have 2
         bc_file_puts(&vm.fout, str);
         ~~~~~~~~~~~~              ^
/usr/src/contrib/bc/include/file.h:81:6: note: 'bc_file_puts' declared here
void bc_file_puts(BcFile *restrict f, BcFlushType type, const char *str);
      ^
This looks to me like the result of an incomplete update of the sources.
History editing has been added a few releases back and the function signature
of bc_files_puts has been changed to take 3 instead  of 2 arguments.
It looks like you got a mismatch between this header and the callers of this
function. Specifically, line 515 mentioned in the error message above is line
    bc_file_puts(&vm.fout, bc_flush_save, str);
Definitely 3 parameters there ...
See https://cgit.freebsd.org/src/tree/contrib/bc/src/program.c?h=stable/13#n512
line 517 - that's what your program.c should look like ...
/usr/src/contrib/bc/src/program.c:529:21: error: too few arguments to function
call, expected 2, have 1
                 bc_vm_putchar('\0');
                 ~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
      ^
/usr/src/contrib/bc/src/program.c:552:23: error: too few arguments to function
call, expected 2, have 1
                                 bc_vm_putchar('\\');
                                 ~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
      ^
/usr/src/contrib/bc/src/program.c:556:18: error: too few arguments to function
call, expected 2, have 1
                 bc_vm_putchar(c);
                 ~~~~~~~~~~~~~  ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
      ^
/usr/src/contrib/bc/src/program.c:601:25: error: too few arguments to function
call, expected 2, have 1
                 bc_file_flush(&vm.fout);
                 ~~~~~~~~~~~~~         ^
/usr/src/contrib/bc/include/file.h:76:6: note: 'bc_file_flush' declared here
void bc_file_flush(BcFile *restrict f, BcFlushType type);
      ^
/usr/src/contrib/bc/src/program.c:607:49: error: too few arguments to function
call, expected 2, have 1
                         if (inst == BC_INST_PRINT) bc_vm_putchar('\n');
~~~~~~~~~~~~~     ^
/usr/src/contrib/bc/include/vm.h:437:6: note: 'bc_vm_putchar' declared here
void bc_vm_putchar(int c, BcFlushType type);
All the other error messages do point at a mix of source files from before
and after introduction of the history feature, too ...
The line numbers in your version of program.c seem to be off, compared to
the current sources, e.g. check out lines 609 and 610 on the above given URL
for the correct sources that correspond to that last error message.
Update your sources to a consistent state and your issue should be resolved.
Let me know if there are any further problems with this program.
Hi Stefan & Mark,
I appreciate the quick response.
That is strange. This build host didn't exist a few days ago and I started with
a fresh git clone of stable/13.I could try to re-clone that but I'm not sure
how it could have a mix of old and new sources. I also do a git pull before
every build attempt ...
Already up to date.
On branch stable/13
Your branch is up to date with 'origin/stable/13'.
However, I am cross compiling aarch64 from an amd64 host which is running the
release branch ....
13.0-RELEASE-p2
Do I need to update my amd64 build host to stable before cross compiling
aarch64? I wouldn't think that compiling sources from /usr/src would be
affected by release files installed on the build host.
Hi Matthew,

that might explain it ...

But in fact, if it did, there would be an issue, since that would indicate
that headers from the running system were used to build the new bc.

BUT: The error messages clearly indicate a build failure caused by a mismatch
between declarations in /usr/src/contrib/bc/include/ and calls in the c files.

And since all files are within /usr/src/contrib/bc/, it is apparent that files
in the base system do not play a role.

Please compare your sources in /usr/src/contrib/bc/ with those in the
repository (starting at the link I sent).

You could also go to that directory and perform "git log ." to get a list
of commits that you have on your system - compare that with the log in the
repository.

Anyway, I do not see that there is anything wrong in general, and I do assume
it is an issue on your build system.

Not much that I could do, I'm afraid.

Regards, STefan

Loading...