Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

expr overflow or underflow breaks pkgsrc builds



I see a strange behavior on current that breaks ability to build some packages from pkgsrc.

One package that does not work on NetBSD current is pkgtools/cwrappers

I am using a very recent checkout of pkgsrc-current and netbsd-current, both updated yesterday.

If you run 'make' in the pkgsrc/pkgtools/cwrappers directory, you will get this error:

expr: integer overflow or underflow occurred for operation '0 + 1'
*** Error code 2

Stop.
make[1]: stopped in /home/chuckz/pkgsrc-current/pkgtools/cwrappers
*** Error code 1

Stop.
make: stopped in /home/chuckz/netbsd/chuckz/obj.amd64/pkgsrc-current-current/pkgtools/cwrappers

Also, if you just run 'expr 0 + 1' from a shell you will see the same error message about integer overflow or underflow.

If you run the same command on NetBSD 7.1, you will get the expected expression and no error: 1

So to workaround I temporarily replaced /bin/expr with /bin/expr from NetBSD 7.1.

Then I can build packages that need to execute 'expr 0 + 1' during the build (I think this occurs in configure scripts for some important packages like cwrappers). I also tested the /bin/expr executable extracted from a recent daily snapshot build from yesterday and it gives the same error when evaluating 0 + 1.

Any ideas if this is expected behavior of /bin/expr?

Thanks,

Chuck Zmudzinski



Home | Main Index | Thread Index | Old Index