1

I am pretty new Freebsd user. As I am trying to install gnu m4-1.4.18, I get eval fail on eval test section:

Checking ./189.eval
@ ../doc/m4.texi:6405: Origin of test
./189.eval: stdout mismatch
--- m4-tmp.2536/m4-xout 2017-12-18 22:11:42.931036000 +0000
+++ m4-tmp.2536/m4-out  2017-12-18 22:11:42.928582000 +0000
@@ -2,8 +2,8 @@

 1
 1
-overflow occurred
--2147483648
+
+2147483648
 0
 -2
 -2

this is what inside 189.eval:

dnl @ ../doc/m4.texi:6405: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
dnl @ Foundation, Inc.
dnl @ This file is free software; the Free Software Foundation
dnl @ gives unlimited permission to copy and/or distribute it
dnl @ with or without modifications, as long as this notice
dnl @ is preserved.
define(`max_int', eval(`0x7fffffff'))
dnl @result{}
define(`min_int', incr(max_int))
dnl @result{}
eval(min_int` < 0')
dnl @result{}1
eval(max_int` > 0')
dnl @result{}1
ifelse(eval(min_int` / -1'), min_int, `overflow occurred')
dnl @result{}overflow occurred
min_int
dnl @result{}-2147483648
eval(`0x80000000 % -1')
dnl @result{}0
eval(`-4 >> 1')
dnl @result{}-2
eval(`-4 >> 33')
dnl @result{}-2

Just to let you know its fresh OS (installation) and its one of the first software I am installing.

B. Belete
  • 13
  • 6
  • 2
    How are you trying to install it? It builds fine from ports on 11.1-STABLE. – D_Bye Dec 18 '17 at 19:58
  • i install it from source with make (check\install). – B. Belete Dec 18 '17 at 19:59
  • 1
    Do you have the ports tree installed on your system? It's the preferred way to install third-party software, and makes the job much easier: `cd /usr/ports/devel/m4 && make all install clean` – D_Bye Dec 18 '17 at 20:02
  • i dont have ports tree installed. i am trying to install the latest STABLE Apache apr but it wont install with the latest *port* of GNU m4(which i have already installed version 1.4.15). so i am trying to do it in that way. – B. Belete Dec 18 '17 at 20:06
  • The latest *port* of [m4](https://www.freshports.org/devel/m4/) is 1.4.18. Your version 1.4.15 is way back from 2010. If you think this is current then you should probably upgrade ports using [portsnap](https://www.freebsd.org/doc/handbook/ports-using.html). – Claus Andersen Dec 20 '17 at 15:02
  • The latest stable version of Apache APR is [1.6.3](https://www.freshports.org/devel/apr1/) which is available as a FreeBSD port. The bleeding edge with [apr2](https://www.freshports.org/devel/apr2/) is available as well. Update using `portsnap` and all the hard work has already been done for you. – Claus Andersen Dec 20 '17 at 15:08
  • I am getting this same error in check-189 on macOS 11.2.3 (Apple Silicon M1) This looks like a 64-bitness fail to me, I am glad you reported it from FreeBSD. – Boyd Waters Apr 10 '21 at 04:29

1 Answers1

1

You are having problems installing software but you do not show us what you are doing. You are just showing the output of some command and we are left guessing.

If you are new to FreeBSD but previously have been used to working on a GNU sytem (Linux) there are some subtle but important differences.

A typical stumbling block when compiling your own programs is make. BSD has a nice make but it is not the same as GNU make. If you want to use GNU make then you will install it. But when using it make is still BSD make but now you have a gmake as well. This can be confusing.

It is the same thing with m4 as FreeBSD has it in the base system.

$ which m4
/usr/bin/m4

But writing that you are installing gnu m4-1.4.18 is not helpful as many roads lead to Rome. Are you installing the package/port or from source?

FreeBSD Package

The most simple way of installing software on FreeBSD is to install the package. Packages are precompiled binary distributions of the ports.

pkg install m4

You are probably not doing this. But this is the easy route.

FreeBSD Port

A FreeBSD port is a collection of patches and whatnot needed to get an application running on FreeBSD. If you have the ports tree installed you would change the directory to devel/m4 and make (compile) the application.

The ports tree is targetting BSD make. Hence it is important to use BSD make and not GNU make. The fun part is that m4 depends on autoconf which in turn depends on GNU make.

But for our purpose we will use BSD make:

$ make
$ sudo make install

An advantage of using ports is that you can change the compile time settings using make config. But in most cases with GNU autotools and friends the defaults will usually suffice and the binary package is all you need.

Source install

My guess is that you are trying to install from source. In that case it is important to know the differences between the GNU and BSD tools which often are named the same. But the GNU tools tend to expect you to be using GNU tools. And if you have a vanilla FreeBSD install then you already have make and m4 but the BSD variants.

So when the GNU instructions say make you should make sure you have GNU make installed and are typing gmake at the command line.

Unless you want to learn these intricacies I will recommend that you stick to packages. If you want to continue down this route you need be more verbose in your questions and show us what you are doing. Without this information we are left guessing.

Update

From reading the comments it seem that the root cause is trying to install Apache APR. This is avaiable in FreeBSD ports as well. At the time of writing the latest port version of APR is 1.6.3 which is in sync with what Apache thinks is the latest stable version.

On new vanilla FreeBSD systems it will then be as simple as typing:

pkg install apr1

If the binary package servers have not caught up yet you can choose to build it yourself. In that case you may change the defaults as well. You do that using the ports tree. Use the portsnap tool to make sure the tree is up-to-date.

If you have no ports tree then:

# portsnap fetch
# portsnap extract

If you just need to update:

# portsnap fetch update

Then:

# cd /usr/ports/devel/apr1
# make config
# make
# make install
Claus Andersen
  • 3,239
  • 1
  • 12
  • 24