Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#45869 closed defect (fixed)

gpg-agent @2.0.26_1: build of gpg-agent fails on 10.6, _strndup undefined.

Reported by: dbevans (David B. Evans) Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mndavidoff (Monte Davidoff)
Port: gpg-agent

Description

Build fails on SL buildbot as follows:

/usr/bin/gcc-4.2 -I/opt/local/include -I/opt/local/include -pipe -Os -F/System/Library/Frameworks/CoreFoundation.framework -D__APPLE_LAUNCHD__ -arch x86_64 -Wall -Wno-pointer-sign -Wpointer-arith  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o t-protect t-protect.o protect.o ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a -L/opt/local/lib -lgcrypt -lgpg-error -L/opt/local/lib -lgpg-error -lintl -Wl,-framework -Wl,CoreFoundation -liconv 
gpg-agent.c:1244: warning: ‘data_array_ssh’ may be used uninitialized in this function
gpg-agent.c:1166: warning: ‘fd’ may be used uninitialized in this function
mv -f .deps/gpg_agent-gpg-agent.Tpo .deps/gpg_agent-gpg-agent.Po
/usr/bin/gcc-4.2 -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -pipe -Os -F/System/Library/Frameworks/CoreFoundation.framework -D__APPLE_LAUNCHD__ -arch x86_64 -Wall -Wno-pointer-sign -Wpointer-arith  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o gpg-agent gpg_agent-gpg-agent.o gpg_agent-command.o gpg_agent-command-ssh.o gpg_agent-call-pinentry.o gpg_agent-cache.o gpg_agent-trans.o gpg_agent-findkey.o gpg_agent-pksign.o gpg_agent-pkdecrypt.o gpg_agent-genkey.o gpg_agent-protect.o gpg_agent-trustlist.o gpg_agent-divert-scd.o gpg_agent-call-scd.o gpg_agent-learncard.o ../common/libcommonpth.a ../jnlib/libjnlib.a ../gl/libgnu.a -L/opt/local/lib -lgcrypt -lgpg-error -lassuan -L/opt/local/lib -lgpg-error -L/opt/local/lib -lpth -ldl -L/opt/local/lib -lgpg-error -lintl -Wl,-framework -Wl,CoreFoundation  -liconv  
Undefined symbols:
  "_strndup", referenced from:
      _main in gpg_agent-gpg-agent.o
      _main in gpg_agent-gpg-agent.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [gpg-agent] Error 1

Apparently, strndup() is only available on 10.7+, so a work around is necessary for 10.6 and earlier.

See the full build log.

Change History (4)

comment:1 Changed 9 years ago by Ionic (Mihai Moldovan)

Port: gpg-agent added
Status: newassigned

comment:2 Changed 9 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

comment:3 Changed 9 years ago by Ionic (Mihai Moldovan)

Port: gnupg2 removed
Resolution: fixed
Status: assignedclosed
Version: 2.3.2

comment:4 Changed 9 years ago by Ionic (Mihai Moldovan)

Summary: gnupg2 @2.0.26_1: build of gpg-agent fails on 10.6, _strndup undefined.gpg-agent @2.0.26_1: build of gpg-agent fails on 10.6, _strndup undefined.
Note: See TracTickets for help on using tickets.