Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get pycrypto to build on FreeBSD #12399

Closed
kcrisman opened this issue Jan 31, 2012 · 20 comments
Closed

Get pycrypto to build on FreeBSD #12399

kcrisman opened this issue Jan 31, 2012 · 20 comments

Comments

@kcrisman
Copy link
Member

Stephen Montgomery-Smith reports:

OK, I started working on building sage.  So far I can get all the spkg's to build except:

gap-4.4.12.p6
pycrypto-2.1.0
singular-3-1-3-3.p3
maxima-5.23.2.p3
sage-4.8

The build problem with pycrypto-2.1.0 and singular-3-1-3-3.p3 are easy to fix.  

The patch is apparently


--- pycrypto-2.1.0/src/src/libtom/tomcrypt_pk.h-orig 2012-01-21 19:43:56.000000000 +0000
+++ pycrypto-2.1.0/src/src/libtom/tomcrypt_pk.h 2012-01-21 19:45:01.000000000 +0000
@@ -496,7 +496,7 @@
 int der_printable_value_decode(int v);
 
 /* UTF-8 */
-#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED)) && !defined(LTC_NO_WCHAR)
+#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) || defined(_GCC_WCHAR_T)) && !defined(LTC_NO_WCHAR)
 #include <wchar.h>
 #else
 typedef ulong32 wchar_t;

Use git branch.

Upstream: Reported upstream. No feedback yet.

CC: @peterjeremy @jpflori

Component: porting: BSD

Keywords: spkg pycrypto

Author: Stephen Montgomery-Smith, Jean-Pierre Flori

Branch/Commit: u/jpflori/ticket/12399 @ 528d988

Reviewer: Jean-Pierre Flori

Issue created by migration from https://trac.sagemath.org/ticket/12399

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Apr 8, 2012

comment:1

I can confirm that this ticket is still required for building sage with FreeBSD. It should be harmless to all other OS builds.

Add a new file patches/src.libtom.tomcrypt_pk.h (you will have to add the patches directory as well)

--- src/src/libtom/tomcrypt_pk.h-orig	2012-01-21 19:43:56.000000000 +0000
+++ src/src/libtom/tomcrypt_pk.h	2012-01-21 19:45:01.000000000 +0000
@@ -496,7 +496,7 @@
 int der_printable_value_decode(int v);
 
 /* UTF-8 */
-#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED)) && !defined(LTC_NO_WCHAR)
+#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) || defined(_GCC_WCHAR_T)) && !defined(LTC_NO_WCHAR)
 #include <wchar.h>
 #else
 typedef ulong32 wchar_t;

and patch spkg-install as follows:

--- pycrypto-2.1.0/spkg-install-orig	2012-04-08 01:30:47.000000000 +0000
+++ pycrypto-2.1.0/spkg-install	2012-04-08 01:31:41.000000000 +0000
@@ -12,6 +12,8 @@
     LDFLAGS="-m64 "; export LDFLAGS
 fi
 
+patch -p0 < patches/src.libtom.tomcrypt_pk.h
+
 CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib $CFLAGS"
 export CFLAGS
 

@sagetrac-stephen
Copy link
Mannequin

sagetrac-stephen mannequin commented Apr 14, 2012

comment:2

I erased this comment and the following comment as they were wrong.

@kcrisman
Copy link
Member Author

comment:4

All that's needed here is a new spkg with an spkg-install that checks whether the patch was applied correctly.

@kcrisman
Copy link
Member Author

Author: Stephen Montgomery-Smith

@jpflori
Copy link
Contributor

jpflori commented Apr 5, 2013

comment:6

The fix is still needed and let pycrypto build on FreeBSD 9.0 x86.
I'll package a spkg this weekend.

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

Upstream: Not yet reported upstream; Will do shortly.

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

Changed author from Stephen Montgomery-Smith to Stephen Montgomery-Smith, Jean-Pierre Flori

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

Reviewer: Jean-Pierre Flori

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

comment:7

The week-end was kind of long.
Uploaded a simple spkg.

Follow up ticket to upgrade pycrypto at #14854.
Note the patch should still be needed.
The patched file did not change.
Time for an upstream bug report I guess.

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

Changed keywords from none to spkg pycrypto

@jpflori

This comment has been minimized.

@jpflori
Copy link
Contributor

jpflori commented Jul 4, 2013

Attachment: pycrypto-2.1.0.p0.diff.gz

Spkg diff, for review only.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@jpflori
Copy link
Contributor

jpflori commented Dec 25, 2013

Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

@jpflori
Copy link
Contributor

jpflori commented Dec 25, 2013

comment:9

I've made a git branch and reported upstream at:

@jpflori
Copy link
Contributor

jpflori commented Dec 25, 2013

Commit: 036984d

@jpflori
Copy link
Contributor

jpflori commented Dec 25, 2013

Branch: u/jpflori/ticket/12399

@jpflori

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 25, 2013

Changed commit from 036984d to 528d988

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 25, 2013

Branch pushed to git repo; I updated commit sha1. New commits:

528d988Let PyCrypto build on FreeBSD.

@fchapoton

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants