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

Copy needed dll to so files on Cygwin #11547

Closed
kcrisman opened this issue Jun 26, 2011 · 31 comments
Closed

Copy needed dll to so files on Cygwin #11547

kcrisman opened this issue Jun 26, 2011 · 31 comments

Comments

@kcrisman
Copy link
Member

As was put on the wiki for Cygwin,

The following files need to be copied:
  "libcliquer.dll -> libcliquer.so", 
  "libflint.dll -> libflint.so",
  "libntl.dll.a -> libntl.dll"

See the comments for why the third one is dealt with at #11635.


Two spkg upgrades:

Depends on #11246

CC: @dimpase @mwhansen @nexttime

Component: porting: Cygwin

Keywords: cygwin FLINT NTL cliquer DLL shared library

Author: Mike Hansen, Karl-Dieter Crisman

Reviewer: Dmitrii Pasechnik

Merged: sage-4.7.2.alpha1

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

@kcrisman
Copy link
Member Author

comment:1

I'm going to put Mike as an "author" of this because [[CygwinPort?version=54]] says he's the one who came up with this.

@kcrisman
Copy link
Member Author

Author: Mike Hansen

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member Author

Changed author from Mike Hansen to Mike Hansen, Karl-Dieter Crisman

@kcrisman
Copy link
Member Author

comment:3

Interestingly, both FLINT and cliquer spkgs currently make reference to needing to make dll's because they're on Windows... it looks like having both won't be a problem, but I wonder out loud whether in the long run we need only the so file.

Anyway, I'm making the spkgs so that they have both.


This will depend on #11246 in the sense that the flint spkg will be based upon it, though obviously there is nothing needed other than to directly upgrade.

@kcrisman
Copy link
Member Author

Dependencies: #11246

@kcrisman
Copy link
Member Author

comment:4

I'm attaching a diff for the flint one (I may also need to do a second upgrade to flint for ntl, since on Cygwin we move certain ntl files out of the way and this would create another one). I used $CP -p instead of just cp because the rest of the script does that, but I'm confused as to what systems don't use cp for their copy - maybe some HP or IBM ones?

@kcrisman
Copy link
Member Author

For review purposes only

@kcrisman
Copy link
Member Author

comment:5

Attachment: trac_11547-flint.diff.gz

@kcrisman

This comment has been minimized.

@kcrisman kcrisman added this to the sage-4.7.2 milestone Jun 29, 2011
@kcrisman
Copy link
Member Author

Attachment: trac_11547-ntl.diff.gz

For review purposes only

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member Author

comment:6

For now, it looks in the spkg-install for flint that it was only the libntl.a file that needed to be moved, not the libntl.dll.a file, so hopefully the libntl.dll file also won't need to be moved. This could be revisited if that didn't work, of course.


Otherwise ready for review, though I'm not assuming it will be immediately positive. That would be nice, though :)

@dimpase
Copy link
Member

dimpase commented Jun 29, 2011

comment:7

Replying to @kcrisman:

For now, it looks in the spkg-install for flint that it was only the libntl.a file that needed to be moved, not the libntl.dll.a file, so hopefully the libntl.dll file also won't need to be moved. This could be revisited if that didn't work, of course.


Otherwise ready for review, though I'm not assuming it will be immediately positive. That would be nice, though :)

Could you post the diff for cliquer, too?
Also, in the future please refrain from unnecessarily reformatting files you are changing in spkgs (it's probably some over-eager editor you are using does it).

@kcrisman
Copy link
Member Author

comment:8

Otherwise ready for review, though I'm not assuming it will be immediately positive. That would be nice, though :)

Could you post the diff for cliquer, too?

Sure, I just didn't think to do it because it was much less invasive.

Also, in the future please refrain from unnecessarily reformatting files you are changing in spkgs (it's probably some over-eager editor you are using does it).

I don't think so. The lines were breaking in my editor, and it seems to be standard practice for the more conscientious Sage developers to fix them to have a more uniform line-width for easy viewing in a terminal session. The SPKG.txt for NTL was particularly bad.

@kcrisman
Copy link
Member Author

Attachment: trac_11547-cliquer.diff.gz

For review purposes only

@kcrisman
Copy link
Member Author

comment:9

Okay, I posted the cliquer one as well. It is really straightforward.

@dimpase
Copy link
Member

dimpase commented Jun 29, 2011

comment:10

Replying to @kcrisman:

Okay, I posted the cliquer one as well. It is really straightforward.

OK, this is Cygwin–only (no changes on other platforms; did a sanity check --- tested spkgs on macosx).
Positive review.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Jul 6, 2011

Changed keywords from none to cygwin FLINT NTL cliquer DLL shared library

@kcrisman
Copy link
Member Author

comment:12

The current flint spkg is now no longer based on #11246, because of some cleaning up done there. Hopefully someone there will make a p8, however. Otherwise I would suggest splitting that one off into a different ticket, just so the others are merged.

@nexttime

This comment has been minimized.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Jul 12, 2011

comment:13

Replying to @kcrisman:

The current flint spkg is now no longer based on #11246, because of some cleaning up done there. Hopefully someone there will make a p8, however. Otherwise I would suggest splitting that one off into a different ticket, just so the others are merged.

I've made a new FLINT p8 spkg based on the latest p7 from #11246.

New FLINT spkg: http://spkg-upload.googlecode.com/files/flint-1.5.0.p8.spkg

md5sum: bcd152d2f0e1d503ffd1e7e637c388ef flint-1.5.0.p8.spkg

Except for the removal of the .svn directories from upstream, I haven't made any further changes (not even replaced the other occurrences of $CP by cp):

leif@quadriga:~/Sage/spkgs/flint-1.5.0.p8$ hg diff --git -r flint-1.5.0.p7 -r flint-1.5.0.p8
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,2 +1,3 @@
 df4a596f2ae97186054f73ca31b94ac0a06bd2b6 flint-1.2.5.p2
 5252db23001a3fa2ed4ee2ad2069673b9a82faf0 flint-1.3.0
+03fb4e599477f450c711ccc121574c03888bdf3c flint-1.5.0.p7
diff --git a/SPKG.txt b/SPKG.txt
--- a/SPKG.txt
+++ b/SPKG.txt
@@ -28,13 +28,19 @@
 
 == Special Update/Build Instructions ==
 
-We patch the makefile slightly to add 64 bit OSX build support and also change
-LIBS such that the NTL interface is linked into the flint library.
-This is not an officially supported option because flint is pure C
-and the NTL interface requires C++.
+ * We patch the makefile slightly to add 64 bit OSX build support and also change
+   LIBS such that the NTL interface is linked into the flint library.
+   This is not an officially supported option because flint is pure C
+   and the NTL interface requires C++.
+ * Remove the '.svn' directories from upstream ('src/') if present.
 
 == Changelog ==
 
+=== flint-1.5.0.p8 (Karl-Dieter Crisman, 12th July 2011) ===
+  * Enable both libflint.dll and .so on Cygwin (see Trac 11547).
+  * Use 'cp' rather than '$CP' (affects only Cygwin).
+  * Remove '.svn' directories from upstream.
+
 === flint-1.5.0.p7 (Jeroen Demeyer, 6 July 2011) ===
  * Trac #11246: remove check for gcc version since we require gcc >= 4.0.1
    for Sage anyway.
diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -98,8 +98,8 @@
     if [ $UNAME = "CYGWIN" ]; then
        # let's move libntl.a back
        mv $SAGE_LOCAL/lib/xxx_libntl.a $SAGE_LOCAL/lib/libntl.a
-       # also name flint library correctly for MS Windows (an so won't work).
-       mv libflint.so libflint.dll
+       # make both kinds of dynamic libraries available for Windows
+       cp -p libflint.so libflint.dll
     fi 
     echo "Deleting old FLINT"
     rm -f $SAGE_LOCAL/lib/libflint*

Ignore the strange diff w.r.t. the tags; the new one is tagged flint-1.5.0.p8, while Jeroen's latest is tagged flint-1.5.0.p7:

changeset:   84:2ed02e07f2ec
tag:         tip
user:        Karl-Dieter Crisman <kcrisman@gmail.com>
date:        Tue Jul 12 18:00:59 2011 +0200
summary:     Added tag flint-1.5.0.p8 for changeset 0c03457839bc

changeset:   83:0c03457839bc
tag:         flint-1.5.0.p8
user:        Karl-Dieter Crisman <kcrisman@gmail.com>
date:        Tue Jul 12 18:00:29 2011 +0200
summary:     #11547 *Copy*  FLINT '.so' to '.dll' on Cygwin such that both are available.

changeset:   82:ab8260189439
user:        Jeroen Demeyer <jdemeyer@cage.ugent.be>
date:        Wed Jul 06 13:03:09 2011 +0000
summary:     Added tag flint-1.5.0.p7 for changeset 03fb4e599477

changeset:   81:03fb4e599477
tag:         flint-1.5.0.p7
user:        Jeroen Demeyer <jdemeyer@cage.ugent.be>
date:        Wed Jul 06 13:03:09 2011 +0000
summary:     Trac #11246: flint-1.5.0.p7 (Jeroen Demeyer, 6 July 2011)

...

@nexttime
Copy link
Mannequin

nexttime mannequin commented Jul 12, 2011

comment:14

P.S.: Further clean-up will be made on another ticket, providing a FLINT 1.5**.2**.pN spkg, most probably #9858.

@jdemeyer
Copy link
Contributor

comment:15

The NTL spkg should be rebased to ntl-5.5.2 from #5731.

@jdemeyer
Copy link
Contributor

Work Issues: Rebase NTL spkg (#5731)

@jdemeyer
Copy link
Contributor

Reviewer: Dmitrii Pasechnik

@kcrisman
Copy link
Member Author

comment:16

Replying to @jdemeyer:

The NTL spkg should be rebased to ntl-5.5.2 from #5731.

Thanks for alerting us to that, Jeroen.

Since that is a pretty big upgrade to NTL at that ticket, I'd prefer to split that off to another ticket - I think it would require retesting that the NTL package compiles on Cygwin and that the change still is necessary, for instance, though it almost certainly is.

That is now #11635. If the other two could get merged asap, that would be wonderful. I can't do anything about it until at least Monday, probably later (due to needing access to Windows machines!), which is why I am splitting it off.

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member Author

Changed work issues from Rebase NTL spkg (#5731) to none

@jdemeyer
Copy link
Contributor

jdemeyer commented Aug 2, 2011

Merged: sage-4.7.2.alpha1

@kcrisman
Copy link
Member Author

comment:18

Ironically, this now doesn't actually work on one of my Cygwins, because of an extra line that crept into one of the patches.

--- src/mpn_extras.h	2009-09-23 18:03:27.000000000 +0800
+++ patches/mpn_extras.h	2011-04-25 22:36:33.000000000 +0800
@@ -22,7 +22,6 @@
 #ifndef MPN_EXTRAS_H
 #define MPN_EXTRAS_H
 
-#include "flint.h"
 #include "ZmodF_poly.h"
 
 #include "longlong_wrapper.h"

Note the newline at the end; removing this solves the problem. I guess this didn't cause trouble on other systems, since these patches are applied universally.

But this fix was still needed, so I've opened #11727 for this.

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

3 participants