2

I am trying to build libpipeline on Mac OS X, but I am getting errors that I have not encountered with other programs that use autotools.

This is the first error I get:

/Developer/usr/bin/ranlib: file: .libs/libgnu.a(sig-handler.o) has no symbols

The second error is much more cryptic:

warning: /Developer/usr/bin/nm: no name list

Finally, I get this error, which is speculatively a culmination of the previous errors.

Undefined symbols for architecture x86_64:
  "_program_name", referenced from:
      _error in libgnu.a(error.o)
      _error_at_line in libgnu.a(error.o)
ld: symbol(s) not found for architecture x86_64

Full log: https://gist.github.com/ahyattdev/7e4da95d48a6d25ad77aad926a14e7b0

Steps to reproduce: Get the source of libpipeline 1.4.1, run configure; make.

ahyattdev
  • 529
  • 1
  • 6
  • 18
  • 1
    The first one is not an error, it's a simple informational message. However, as far as I know, neither `libpipeline` nor `libgnu` are supported on OS X. – Leandros Apr 24 '16 at 15:10
  • 1
    `program_name` is extern symbol. Try with `CFLAGS="-Wl,-flat_namespace,-undefined,suppress"`. – baf Apr 24 '16 at 20:30
  • Those arguments fixed this issue for me. A library specific issue was then introduced, which I fixed with a dummy header. – ahyattdev Apr 25 '16 at 00:01

1 Answers1

2

This comment was the main contribution to this answer

Configure command:

CFLAGS="-Wl,-flat_namespace,-undefined,suppress -Iwindows.h" ./configure

A few errors arise related to a header that is windows specific, but it only needs a few entries in the header to get this to compile.

Contents of windows.h (I placed it in the project root)

typedef intptr_t;
#define INVALID_HANDLE_VALUE -1

This will allow the project to successfully build.

Community
  • 1
  • 1
ahyattdev
  • 529
  • 1
  • 6
  • 18
  • 2
    The flags seem to confuse `configure` script. It may result in a broken binary. Try adding them to `make` command instead: `make CFLAGS="-Wl,-flat_namespace,-undefined,suppress"`. – baf Apr 28 '16 at 06:39
  • 1
    @baf You're right in that passing those flags to `configure` confuses it and results in a broken binary. It did that for me, at least. Passing them to `make` instead seems to have fixed the issue. – GDP2 Jun 20 '16 at 07:49