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

./configure chokes on giella-core version check if there are spaces in path #12

Open
reynoldsnlp opened this issue Feb 17, 2021 · 5 comments

Comments

@reynoldsnlp
Copy link
Contributor

reynoldsnlp commented Feb 17, 2021

One of my students had a mysterious error complaining about a outdated giella-core, but the problem was that it was choking on a space in a directory name in her path (in her case, BYU Junior Year/:

checking for gt-version.sh... /Users/username/Documents/BYU Junior Year/GitHub/lang-fro/./../giella-core/scripts/gt-version.sh
checking the version of the Giella Core... ./configure: line 3296: /Users/username/Documents/BYU: No such file or directory
@flammie
Copy link
Contributor

flammie commented Feb 18, 2021

I think there will be lots more, also not merged to languages yet.

@flammie flammie reopened this Feb 18, 2021
@TinoDidriksen
Copy link
Member

Spaces in paths are generally just a bad idea when working with anything that builds or generates from sources. Should it work? Yes. Will it work? Probably not. And even when you fix all current paths, new ones will crop up.

@flammie
Copy link
Contributor

flammie commented Feb 22, 2021

I just made some extra testing to uncover other problems:

$  mkdir dir\ with\ spaces
$ cd dir\ with\ spaces
$  git clone [email protected]:giellalt/lang-zxx
$  cd lang-zxx/
$ ./autogen.sh 
basename: ekstra operand «spaces/lang-zxx»
Prøv å skrive «basename --help» for mer informasjon.

Looking for giella-core ...
./autogen.sh: linje 62: test: for mange argumenter
Nothing found, cloning giella-core in ../
Klone nach 'giella-core' ...
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
remote: Enumerating objects: 161, done.
remote: Counting objects: 100% (161/161), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 20688 (delta 80), reused 139 (delta 71), pack-reused 20527
Empfange Objekte: 100% (20688/20688), 11.44 MiB | 7.49 MiB/s, Fertig.
Löse Unterschiede auf: 100% (12675/12675), Fertig.

Looking for giella-shared ...
./autogen.sh: linje 62: test: for mange argumenter
Nothing found, cloning giella-shared in ../
Klone nach 'giella-shared' ...
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
remote: Enumerating objects: 150, done.
remote: Counting objects: 100% (150/150), done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 7754 (delta 61), reused 89 (delta 0), pack-reused 7604
Empfange Objekte: 100% (7754/7754), 3.28 MiB | 5.21 MiB/s, Fertig.
Löse Unterschiede auf: 100% (3064/3064), Fertig.

basename: ekstra operand «spaces/lang-zxx»
Prøv å skrive «basename --help» for mer informasjon.
Initial automake setup of 
configure.ac:160: installing 'build-aux/config.guess'
configure.ac:160: installing 'build-aux/config.sub'
configure.ac:34: installing 'build-aux/install-sh'
configure.ac:34: installing 'build-aux/missing'

@albbas
Copy link
Contributor

albbas commented Feb 23, 2021

For shell scripts we could probably use shellcheck to root out such problems. It gives e.g. these kinds of reports:

In autogen.sh line 157:
            cp $LOGINFILE $LOGINFILE.gtbackup.${DATE}-${TIME}
                                              ^-----^ SC2086: Double quote to prevent globbing and word splitting.

@flammie
Copy link
Contributor

flammie commented Mar 4, 2021

I kind of fixed most of the stuff but it turns out the fix for pkg-config not accepting spaces in explicit path only works for pkgconf and not the original pkg-config so the one remaining problem is with giella-common pkg-config stuff in configure

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

No branches or pull requests

4 participants