Comments (7)
As far as I remember BASH specification, construct [ -z smth ] and [ ! -z smth ] is illegal if smth is a string with spaces. Such problems are usually fixed with double-quotes ". I am however unsure how bash evaluates string like
I think that cp command will fail if $(DESTDIR) evaluates to string with spaces.
I wrote and browsed many ebuild scripts (which are by definition bash scripts) and 100% sure that constructs
cp $file $dir/$file_dest
should always come with double-quotes:
cp $file "$dir/$file_dest" or cp $file "$dir"/"$file_dest"
from flint2.
created ebuild to build FLINT with BLAND extension. Result: success (created .so contains extension subroutines _elem*
), file-name: https://github.com/krisk0/razin/blob/master/ebuild/flint-2.4.3-r1.ebuild
created ebuild to build FLINT with BLAND and ANTIC extensions. Result: failure (build process terminates successfully but does not attempt to build any extension; -I
set to a stupid value), file-name: https://github.com/krisk0/razin/blob/master/ebuild/flint-2.4.3-r2.ebuild
I also noticed that configure/make does not support space in either build dir or dest dir (at least make quickly terminates if build dir has space inside)
from flint2.
Are you putting double quotes around the list of extension paths, e.g.
--extensions="/path/to/bland /path/to/antic"
It definitely needs them. However, I am not sure if I've tried to do this
myself, so I don't know for sure if it works.
Bill.
On 14 April 2014 12:50, Денис Крыськов (Denis Kryskov) <
[email protected]> wrote:
created ebuild to build FLINT with BLAND extension. Result: success
(created .so contains extension subroutines _elem*), file-name:
https://github.com/krisk0/razin/blob/master/ebuild/flint-2.4.3-r1.ebuildcreated ebuild to build FLINT with BLAND and ANTIC extensions. Result:
failure (build process terminates successfully but does not attempt to
build any extension; -I set to a stupid value), file-name:
https://github.com/krisk0/razin/blob/master/ebuild/flint-2.4.3-r2.ebuildI also noticed that configure/make does not support space in either build
dir or dest dir (at least make quickly terminates if build dir has space
inside)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/62#issuecomment-40353553
.
from flint2.
In 2nd ebuild (that does not work), of course, yes, because there are 2 directories:
with_ext="--extensions=\"$WORKDIR/bland-master $WORKDIR/antic-trunc\""
./configure \
"$with_mpir"\
"$with_ext"\
--with-mpfr="$EPREFIX/usr"\
...
Putting douible-quotes into 1st ebuild breaks it: the thing pretends to work, but never attempts to build extension, and resulting .so does not contain any subroutine _elem...
Lines that work and build extension:
with_ext="--extensions=$WORKDIR/bland-master"
./configure \
"$with_mpir"\
"$with_ext"\
--with-mpfr="$EPREFIX/usr"\
IMHO foreach directive in Makefile is the problem
from flint2.
As far as I remember BASH specification, construct [ -z smth ] and [ ! -z smth ] is illegal if smth is a string with spaces. Such problems are usually fixed with double-quotes ". I am however unsure how bash evaluates string like
$(EXT_HEADERS) because according to man page of bash, $ (smth) means run command smth and take its stdout.
$(EXT_HEADERS)
is expanded by make
, not the shell.
The shell (whether bash or some other shell) doesn't care either; [
is an alias for test
, an external program. To be on the safe side, in [ -z $var ]
the variable should always be quoted.
In Sage, currently the following patch gets applied:
commit 81c820b73dc0208f107629d7658f4f0642ca64e8
Author: Jean-Pierre Flori <[email protected]>
Date: Mon Feb 3 15:02:22 2014 +0100
Fix test for empty string in install target.
diff --git a/Makefile.in b/Makefile.in
index 0fa717b..19caed2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -178,7 +178,7 @@ install: library
cp libflint.a $(DESTDIR)$(PREFIX)/lib; \
fi
cp $(HEADERS) $(DESTDIR)$(PREFIX)/include/flint
- $(AT)if [ ! -z $(EXT_HEADERS) ]; then \
+ $(AT)if [ ! -z "$(EXT_HEADERS)" ]; then \
cp $(EXT_HEADERS) $(DESTDIR)$(PREFIX)/include/flint; \
fi
mkdir -p $(DESTDIR)$(FLINT_CPIMPORT_DIR)
from flint2.
In my humble opinion this patch is useless because either make variable EXT_HEADERS is evil and cp $(EXT_HEADERS) ... will fail, or EXT_HEADERS is good and everything is fine, with or without patch
from flint2.
This patch has now been applied in the repository and will make it into flint-2.5.
from flint2.
Related Issues (20)
- Could we release 3.1.3-p1? HOT 1
- fmpz_mpoly_pfrac_init: internal error HOT 7
- Worklist for nfloat HOT 3
- SIMD abstraction layers HOT 5
- Problems with Riemann theta functions HOT 44
- 3.1.3 isn't in the Downlioads section of the website: https://flintlib.org/downloads.html HOT 2
- Document need for libtool
- Improve parallel Schönhage-Strassen multiplication
- file padic_types.h not getting installed HOT 2
- Test failures when compiled with GCC graphite flags HOT 5
- #error machine_vector.h not implemented on AMD Ryzen 7 without forcing --enable-avx HOT 14
- Segmentation Fault in Fortran-C Interoperability when Using Arb Library for Complex Integration HOT 2
- Error finding PkgConfig while installing Flint package using CMake on Windows HOT 1
- Add a function to compute b/sqrt(a)
- Multivariate rational functions over the integers mod n HOT 3
- AVX and nmod HOT 8
- FLINT license should be stated on the FLINT website HOT 1
- Gentoo Linux: sci-mathematics/flint-3.1.3_p1 QA Notice: Package triggers severe warnings which indicate that it may exhibit random runtime failures. HOT 1
- Missing functions in `fq_default` HOT 1
- `fq_default_poly_evaluate_fq_default` with context type `FMPZ_MOD` segfaults
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flint2.