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

FoBiS.py build: error: argument -lflags: expected one argument #43

Closed
zbeekman opened this issue Mar 1, 2015 · 4 comments
Closed

FoBiS.py build: error: argument -lflags: expected one argument #43

zbeekman opened this issue Mar 1, 2015 · 4 comments

Comments

@zbeekman
Copy link
Contributor

zbeekman commented Mar 1, 2015

I’m confused… I’m trying to pass more than one link flag but I get the following error:

FoBiS.py build: error: argument -lflags: expected one argument

it seems that the space between -lflags and the stuff that follows it causes this error.

@szaghi
Copy link
Owner

szaghi commented Mar 2, 2015 via email

@szaghi szaghi closed this as completed Mar 2, 2015
@zbeekman
Copy link
Contributor Author

zbeekman commented Mar 2, 2015

Well, in v1.5.5 I’m seeing some odd behavior. It may be due to the bugs you previously referenced in upstream libraries (arg-parse or something like that). Sometimes FoBiS.py doesn’t mind if there’s a space between -cflags or -lflags and the argument, and other times it complains saying: FoBiS.py build: error: argument -lflags: expected one argument. See the example below:

$ FoBiS.py build -compiler gnu -lflags "-profile-arcs -ftest-coverage" -cflags "-fprofile-arcs -ftest-coverage" ../../src/tests/jf_test_1.f90
usage: FoBiS.py build [-h] [-compiler {gnu,intel,g95,custom}] [-fc FC]
                      [-cflags CFLAGS] [-lflags LFLAGS] [-p PREPROC]
                      [-coverage] [-modsw MODSW] [-mpi]
                      [-mklib {static,shared}] [-ch] [-s SRC]
                      [-dbld BUILD_DIR] [-dobj OBJ_DIR] [-dmod MOD_DIR]
                      [-dlib LIB_DIR [LIB_DIR ...]] [-i INCLUDE [INCLUDE ...]]
                      [-t TARGET] [-o OUTPUT] [-e EXCLUDE [EXCLUDE ...]]
                      [-libs LIBS [LIBS ...]] [-vlibs VLIBS [VLIBS ...]]
                      [-ext_libs EXT_LIBS [EXT_LIBS ...]]
                      [-ext_vlibs EXT_VLIBS [EXT_VLIBS ...]]
                      [-dependon DEPENDON [DEPENDON ...]] [-inc INC [INC ...]]
                      [-extensions EXTENSIONS [EXTENSIONS ...]] [-f FOBOS]
                      [-fci] [-mode MODE] [-lmodes] [-pfm] [-dpfm PFM_DIR]
                      [-epfm PFM_EXT [PFM_EXT ...]] [-force_compile] [-colors]
                      [-l] [-graph] [-q] [-verbose] [-j JOBS]
                      [-m MAKEFILE_name]
FoBiS.py build: error: argument -lflags: expected one argument

But if I remove the space between -lflags and its argument, ”-fprofile-arcs -ftest-coverage” then it works.

@szaghi
Copy link
Owner

szaghi commented Mar 2, 2015

@zbeekman I am very sorry, but I think there was a misunderstanding: to avoid the argparse bug the white space must be inserted into the quoted argument

may fail

FOBiS.py build -lflags "-fprofile..."

should work

FOBiS.py build -lflags " -fprofile..."

The white space must be inserted immediatly after the first quoting mark ". Maybe the error was due to my bad English, I am sorry.

@zbeekman
Copy link
Contributor Author

zbeekman commented Mar 2, 2015

ah I see, I think that does fix it… I’ll test some more to be sure…

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

2 participants