patch: build libcryptopp.so

View: New views
2 Messages — Rating Filter:   Alert me  

patch: build libcryptopp.so

by zooko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Folks:

Here is a patch to build a shared lib on Linux.

Regards,

Zooko

Fri May 22 20:59:12 MDT 2009  zooko@...
   * add shared-library target "libcryptopp.so" for linux, add "*.so"  
to install target
diff -rN -u old-release-5.6.0-plus-zookopatches/c5/GNUmakefile new-
release-5.6.0-plus-zookopatches/c5/GNUmakefile
--- old-release-5.6.0-plus-zookopatches/c5/GNUmakefile 2009-05-23  
18:39:57.000000000 -0600
+++ new-release-5.6.0-plus-zookopatches/c5/GNUmakefile 2009-05-23  
18:39:58.000000000 -0600
@@ -120,13 +120,17 @@
  install:
  $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
  $(CP) *.h $(PREFIX)/include/cryptopp
- $(CP) *.a $(PREFIX)/lib
+ -$(CP) *.a $(PREFIX)/lib
+ $(CP) *.so $(PREFIX)/lib
  $(CP) *.exe $(PREFIX)/bin

  libcryptopp.a: $(LIBOBJS)
  $(AR) $(ARFLAGS) $@ $(LIBOBJS)
  $(RANLIB) $@

+libcryptopp.so: $(LIBOBJS)
+ $(CXX) -shared -o $@ $(LIBOBJS)
+
  cryptest.exe: libcryptopp.a $(TESTOBJS)
  $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $
(LDLIBS)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---


Fri May 22 20:59:12 MDT 2009  zooko@...
  * add shared-library target "libcryptopp.so" for linux, add "*.so" to install target
diff -rN -u old-release-5.6.0-plus-zookopatches/c5/GNUmakefile new-release-5.6.0-plus-zookopatches/c5/GNUmakefile
--- old-release-5.6.0-plus-zookopatches/c5/GNUmakefile 2009-05-23 18:39:57.000000000 -0600
+++ new-release-5.6.0-plus-zookopatches/c5/GNUmakefile 2009-05-23 18:39:58.000000000 -0600
@@ -120,13 +120,17 @@
 install:
  $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
  $(CP) *.h $(PREFIX)/include/cryptopp
- $(CP) *.a $(PREFIX)/lib
+ -$(CP) *.a $(PREFIX)/lib
+ $(CP) *.so $(PREFIX)/lib
  $(CP) *.exe $(PREFIX)/bin
 
 libcryptopp.a: $(LIBOBJS)
  $(AR) $(ARFLAGS) $@ $(LIBOBJS)
  $(RANLIB) $@
 
+libcryptopp.so: $(LIBOBJS)
+ $(CXX) -shared -o $@ $(LIBOBJS)
+
 cryptest.exe: libcryptopp.a $(TESTOBJS)
  $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)
 


Re: patch: build libcryptopp.so

by Zooko O'Whielacronx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


[adding Cc: Jens Peter Secher, the Debian maintainer for Crypto++, and
Aurélien Bompard, the Fedora maintainer for Crypto++]

Dear Wei Dai and members of cryptopp-users mailing list:

Per the discussion on the Python cplusplus-sig [1, 2], I no longer
think this patch to build a shared lib for Crypto++ is a good idea and
have eliminated it from my copy of Crypto++ which is bundled inside
pycryptopp.

I know that Debian and Fedora have both developed their own build
systems for Crypto++ which do produce shared libs.  It would seem
useful for Crypto++ mainline and Debian and Fedora to share these
build scripts with each other, and for either the former to persuade
the latter to use the upstream (static lib) approach or for the latter
to persuade the former to support the distribution (shared lib)
approach, or at least for the build scripts to be added into the
upstream repository along with some note saying "The following is what
Debian/Fedora does to build shared libs, but this is not supported by
Crypto++ upstream.".

Adding the scripts into the repository and updating the readme or the
GNUmakefile like this would be a form of inter-project communication,
helping both sides to be aware of what the other side is doing and
also helping third parties (like me) to recognize what the situation
is.

Thank you for your attention.

Regards,

Zooko

[1] http://mail.python.org/pipermail/cplusplus-sig/2009-May/014531.html
[2] http://mail.python.org/pipermail/cplusplus-sig/2009-May/014536.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---