Bug 166388 - security/libgcrypt is broken
Summary: security/libgcrypt is broken
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 11:50 UTC by glevand
Modified: 2013-06-26 22:30 UTC (History)
0 users

See Also:


Attachments
libgcrypt.patch (841 bytes, patch)
2012-07-03 19:21 UTC, Michael Scheidell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description glevand 2012-03-25 11:50:11 UTC
I'm not able to compile libgcrypt on FreeBSD 10 powerpc64 with the latest ports.

-------------- Error 1 --------------

mv -f .deps/compat.Tpo .deps/compat.Plo
/bin/sh /usr/local/bin/libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I. -I..   -I../src -I../src -I/usr/local/include -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT getpid.lo -MD -MP -MF .deps/getpid.Tpo -c -o getpid.lo getpid.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT getpid.lo -MD -MP -MF .deps/getpid.Tpo -c getpid.c  -fPIC -DPIC -o .libs/getpid.o
getpid.c:28:3: error: #error No replacement function for getpid known
*** [getpid.lo] Error code 1

Stop in /usr/ports/security/libgcrypt/work/libgcrypt-1.5.0/compat.
*** [all-recursive] Error code 1

-------------- Error 2 --------------

mv -f .deps/getpid.Tpo .deps/getpid.Plo
/bin/sh /usr/local/bin/libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I. -I..   -I../src -I../src -I/usr/local/include -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT clock.lo -MD -MP -MF .deps/clock.Tpo -c -o clock.lo clock.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT clock.lo -MD -MP -MF .deps/clock.Tpo -c clock.c  -fPIC -DPIC -o .libs/clock.o
clock.c:35:3: error: #error No replacement function for clock known
*** [clock.lo] Error code 1

Stop in /usr/ports/security/libgcrypt/work/libgcrypt-1.5.0/compat.
*** [all-recursive] Error code 1

-------------- Error 3 --------------

/bin/sh /usr/local/bin/libtool --tag=CC    --mode=compile cc -DHAVE_CONFIG_H -I. -I..   -I../src -I../src -I/usr/local/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT random-csprng.lo -MD -MP -MF .deps/random-csprng.Tpo -c -o random-csprng.lo random-csprng.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT random-csprng.lo -MD -MP -MF .deps/random-csprng.Tpo -c random-csprng.c  -fPIC -DPIC -o .libs/random-csprng.o
random-csprng.c: In function 'do_fast_random_poll':
random-csprng.c:1211: error: storage size of 'buf' isn't known
random-csprng.c:1212: warning: implicit declaration of function 'times'
random-csprng.c:1211: warning: unused variable 'buf'
*** [random-csprng.lo] Error code 1

Stop in /usr/ports/security/libgcrypt/work/libgcrypt-1.5.0/random.
*** [all-recursive] Error code 1


-------------- Error 4 --------------

libtool: link: ranlib .libs/libgcrypt.a
libtool: link: rm -fr .libs/libgcrypt.lax
libtool: link: ( cd ".libs" && rm -f "libgcrypt.la" && ln -s "../libgcrypt.la" "libgcrypt.la" )
cc -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -MT dumpsexp-dumpsexp.o -MD -MP -MF .deps/dumpsexp-dumpsexp.Tpo -c -o dumpsexp-dumpsexp.o `test -f 'dumpsexp.c' || echo './'`dumpsexp.c
mv -f .deps/dumpsexp-dumpsexp.Tpo .deps/dumpsexp-dumpsexp.Po
/bin/sh /usr/local/bin/libtool --tag=CC    --mode=link cc  -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall   -L/usr/local/lib -o dumpsexp dumpsexp-dumpsexp.o
libtool: link: cc -O2 -pipe -fno-strict-aliasing -std=gnu89 -fvisibility=hidden -Wall -o dumpsexp dumpsexp-dumpsexp.o  -L/usr/local/lib
/usr/bin/ld: dumpsexp: hidden symbol `main' in dumpsexp-dumpsexp.o is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
*** [dumpsexp] Error code 1

Stop in /usr/ports/security/libgcrypt/work/libgcrypt-1.5.0/src.
*** [all-recursive] Error code 1

Fix: 

I could fix errors 1-3 but not the 4th.

--------- Fix for Error 1 -----------

Remove #error line from getpid.c

--------- Fix for Error 2 -----------

Remove #error line from clock.c

--------- Fix for Error 3 -----------

Remove #ifdef around #include <sys/times.h> in file random-csprng.c
How-To-Repeat: Just compile libgcrypt from ports.
Comment 1 Edwin Groothuis freebsd_committer 2012-03-25 13:17:14 UTC
Maintainer of security/libgcrypt,

Please note that PR ports/166388 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/166388

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2012-03-25 13:17:16 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Hirohisa Yamaguchi 2012-04-05 20:48:46 UTC
Hi,

At Sun, 25 Mar 2012 12:17:14 UT,
Edwin Groothuis wrote:
> 
> Maintainer of security/libgcrypt,
> 
> Please note that PR ports/166388 has just been submitted.

It looks like a ppc (or ppc64) specific problem.

I don't have PowerPC environment to reproduce the problem at this
moment.
Could you please tell me (if it's possible) that building
security/libgcrypt with 9.0-RELEASE, too?


Regards,
-- 

	Hirohisa Yamaguchi
	  umq@ueo.co.jp
Comment 4 Michael Scheidell freebsd_committer 2012-06-11 07:31:27 UTC
Hirohisa:

did you want this marked 'BROKEN in ppc' for now?? wait for an upstream fix?
secondary architectures are problematic (and we have just discussed this 
in ports@ in fact).
We don't have enough resources, and there are no tinderbox's even for 
ports committers to try this.

-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 5 Michael Scheidell freebsd_committer 2012-07-03 19:16:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->scheidell

I'll take it.
Comment 6 Michael Scheidell freebsd_committer 2012-07-03 19:21:53 UTC
Hirohisa:

I propose the attached patched, and this for commit log:

- Mark Broken for ppc
- Remove check for obsolete, unsupported OS version
- pet portlint (space/vs tab, like 41, 44 of Makefile)


-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
http://people.freebsd.org/~scheidell

______________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com/
______________________________________________________________________  
  
Comment 7 Michael Scheidell freebsd_committer 2012-07-22 23:59:40 UTC
ping?
ok to commit?

-- 
Michael Scheidell, CTO
 >*| * SECNAP Network Security Corporation
d: +1.561.948.2259
w: http://people.freebsd.org/~scheidell
Comment 8 dfilter service freebsd_committer 2012-07-24 16:51:41 UTC
Author: scheidell
Date: Tue Jul 24 15:51:26 2012
New Revision: 301475
URL: http://svn.freebsd.org/changeset/ports/301475

Log:
  - Mark Broken for ppc
  - Remove check for obsolete, unsupported OS version
  - pet portlint (space/vs tab, like 41, 44 of Makefile)
  
  PR:		ports/166388
  Submitted by:	scheidell@ (me)
  Reported by: 	glevand <geoffrey.levand@mail.ru>
  Approved by:	maintainer (timeout, 21 days)

Modified:
  head/security/libgcrypt/Makefile   (contents, props changed)

Modified: head/security/libgcrypt/Makefile
==============================================================================
--- head/security/libgcrypt/Makefile	Tue Jul 24 15:50:12 2012	(r301474)
+++ head/security/libgcrypt/Makefile	Tue Jul 24 15:51:26 2012	(r301475)
@@ -35,16 +35,14 @@ INFO=	gcrypt
 
 .if ${ARCH} == "powerpc"
 CONFIGURE_ARGS+=	--disable-asm
+BROKEN=	will not compile. See pr ports/166388
 .elif ${ARCH} == "i386"
 .if (${OSVERSION} < 900033)
-CONFIGURE_ARGS+=  --disable-aesni-support
+CONFIGURE_ARGS+=	--disable-aesni-support
 #workaround for FreeBSD 10.0
 .elif (${OSVERSION} >= 1000000)
-CONFIGURE_ARGS+=  --disable-asm
-.endif
+CONFIGURE_ARGS+=	--disable-asm
 .endif
-.if (${OSVERSION} < 700000)
-CONFIGURE_ARGS+=	--disable-padlock-support
 .endif
 
 post-patch:
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Michael Scheidell freebsd_committer 2012-07-24 16:51:42 UTC
State Changed
From-To: feedback->closed

Committed.
Comment 10 spam 2012-08-17 06:32:19 UTC
This fix also worked for me on Mac Mini G4, FreeBSD 9.1-PRERELEASE =
FreeBSD 9.1-PRERELEASE #0:

Regards
Pasi
Comment 11 Jason W. Bacon freebsd_committer 2012-09-02 14:26:03 UTC
FYI, the port builds fine on 
FreeBSD-9.1-RELENG_9-20120830-JPSNAP-powerpc-powerpc-release.

I simply commented out the BROKEN line, and it built and installed 
without incident on an iBook G4.  Maybe BROKEN should be restricted to 
FreeBSD 10?

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason W. Bacon
jwbacon@tds.net
http://personalpages.tds.net/~jwbacon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 12 mathias.breuninger 2012-09-04 08:14:40 UTC
I can confirm that libgcrypt builds fine on FreeBSD/powerpc and =
FreeBSD/powerpc64 (9.0-RELEASE and 9.1RC1).

Regards.

--
Mathias
Comment 13 Mark Linimon freebsd_committer freebsd_triage 2012-09-07 20:31:49 UTC
State Changed
From-To: closed->open

re-open and take. 


Comment 14 Mark Linimon freebsd_committer freebsd_triage 2012-09-07 20:31:49 UTC
Responsible Changed
From-To: scheidell->linimon
Comment 15 Mark Linimon freebsd_committer freebsd_triage 2012-09-16 08:05:42 UTC
State Changed
From-To: open->feedback

I have unmarked the port as broken on 7/8/9.  Can anyone confirm 
whether or not it builds for them on 10?  The cluster is not yet 
set up to try powerpc-10 builds.
Comment 16 Mark Linimon freebsd_committer freebsd_triage 2013-02-20 05:24:40 UTC
State Changed
From-To: feedback->closed

Feedback timeout. 


Comment 17 Mark Linimon freebsd_committer freebsd_triage 2013-02-20 05:24:40 UTC
Responsible Changed
From-To: linimon->linimon
Comment 18 Justin Hibbits 2013-04-07 01:11:47 UTC
libgcrypt does build on ppc -CURRENT, it has built fine for both powerpc
and powerpc64 for a while now.
Comment 19 triplephoenix 2013-06-26 22:25:36 UTC
This PR recently came to my attention when I encountered the same
problem.  The issue seems to affect Clang (now used by default in
10-CURRENT) and newer versions of GCC (4.6+).  Clang complains about
several more unavailable reloc types than newer GCC versions, though.

By using system-included GCC, I was able to get this port to compile
successfully on PPC32 and 64.

I'm in favor of treating this as a communication problem between these
new(er) compilers and the system linker, since the compilers seem to
be creating binaries that /usr/bin/ld thinks are invalid.  Using the
linkers from each newer GCC version did not correct the problem.

In the mean time, we could simply set a conditional in
/usr/ports/security/libgcrypt/Makefile that forces usage of the
bundled GCC if ARCH is powerpc[64].

Sincerely,
Guy M. Broome


At Fri, 06 Apr 2012 04:48:46 +0900
Hirohisa Yamaguchi wrote:
> Hi,
>
> At Sun, 25 Mar 2012 12:17:14 UT,
> Edwin Groothuis wrote:
> >
> > Maintainer of security/libgcrypt,
> >
> > Please note that PR ports/166388 has just been submitted.
>
> It looks like a ppc (or ppc64) specific problem.
>
> I don't have PowerPC environment to reproduce the problem at this
> moment.
> Could you please tell me (if it's possible) that building
> security/libgcrypt with 9.0-RELEASE, too?
>
>
> Regards,
> --
>
> 	Hirohisa Yamaguchi
> 	  umq at ueo.co.jp <http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs>