pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13497: Build with dtrace fails
3+ messages / 3 participants
[nested] [flat]

* BUG #13497: Build with dtrace fails
@ 2015-07-13 09:54 dmilith@gmail.com
  2015-07-22 20:13 ` Re: BUG #13497: Build with dtrace fails Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 3+ messages in thread

From: dmilith@gmail.com @ 2015-07-13 09:54 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13497
Logged by:          Daniel (dmilith) Dettlaff
Email address:      dmilith@gmail.com
PostgreSQL version: 9.4.4
Operating system:   FreeBSD 10.1
Description:        

utils/probes.o: In function `dtrace_dof_init':
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0xd7):
undefined reference to `elf_version'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x10f):
undefined reference to `elf_begin'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x131):
undefined reference to `elf_getshdrstrndx'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x13b):
undefined reference to `elf_nextscn'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x1a2):
undefined reference to `elf_getdata'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x1ce):
undefined reference to `elf_getdata'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x1e1):
undefined reference to `elf_getdata'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x207):
undefined reference to `gelf_getshdr'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x22b):
undefined reference to `elf_strptr'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x24e):
undefined reference to `elf_nextscn'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x5df):
undefined reference to `elf_end'
utils/probes.o: In function `fixsymbol':
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x79b):
undefined reference to `gelf_getsym'
/usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0x7d3):
undefined reference to `elf_strptr'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Makefile:57: recipe for target 'postgres' failed


To fix this, I needed to add -lelf to LDFLAGS. The build passes.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #13497: Build with dtrace fails
  2015-07-13 09:54 BUG #13497: Build with dtrace fails dmilith@gmail.com
@ 2015-07-22 20:13 ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2015-07-27 08:22   ` Re: BUG #13497: Build with dtrace fails Lacey Powers <lacey.leanne@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2015-07-22 20:13 UTC (permalink / raw)
  To: dmilith@gmail.com; +Cc: pgsql-bugs

dmilith@gmail.com wrote:

> utils/probes.o: In function `dtrace_dof_init':
> /usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0xd7):
> undefined reference to `elf_version'

> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> Makefile:57: recipe for target 'postgres' failed
> 
> 
> To fix this, I needed to add -lelf to LDFLAGS. The build passes.

Grumble.

Isn't this a platform bug?  I mean, if you specify to build with dtrace,
maybe the -lelf should be implicit, or something.  I assume there's a
manpage in FreeBSD for this stuff, what does it say?

If we need to workaround, I guess we could add a SEARCH_AC_LIBS to
configure when DTrace is specified (maybe only on freebsd?).

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #13497: Build with dtrace fails
  2015-07-13 09:54 BUG #13497: Build with dtrace fails dmilith@gmail.com
  2015-07-22 20:13 ` Re: BUG #13497: Build with dtrace fails Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-07-27 08:22   ` Lacey Powers <lacey.leanne@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Lacey Powers @ 2015-07-27 08:22 UTC (permalink / raw)
  To: pgsql-bugs



On 07/22/2015 13:13, Alvaro Herrera wrote:
> dmilith@gmail.com wrote:
>
>> utils/probes.o: In function `dtrace_dof_init':
>> /usr/src/cddl/lib/drti/../../../cddl/contrib/opensolaris/lib/libdtrace/common/drti.c:(.text+0xd7):
>> undefined reference to `elf_version'
>> clang: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>> Makefile:57: recipe for target 'postgres' failed
>>
>>
>> To fix this, I needed to add -lelf to LDFLAGS. The build passes.
> Grumble.
>
> Isn't this a platform bug?  I mean, if you specify to build with dtrace,
> maybe the -lelf should be implicit, or something.  I assume there's a
> manpage in FreeBSD for this stuff, what does it say?
>
> If we need to workaround, I guess we could add a SEARCH_AC_LIBS to
> configure when DTrace is specified (maybe only on freebsd?).
>

Hi All,

Yes, this is a known oddity with FreeBSD specifically, not with PostgreSQL.

Discussed here:

https://lists.freebsd.org/pipermail/freebsd-dtrace/2015-January/000342.html

And addressed in the ports tree as well:

https://svnweb.freebsd.org/ports/head/databases/postgresql92-server/Makefile?view=markup#l168

Though, sadly, the need to link -lelf is not clear if you're building 
from source and not using the ports tree, unless you do some searching 
around.

Hope that helps,

Lacey


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2015-07-27 08:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 09:54 BUG #13497: Build with dtrace fails dmilith@gmail.com
2015-07-22 20:13 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-07-27 08:22   ` Lacey Powers <lacey.leanne@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox