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

fobs file doesn’t actually build anything #34

Closed
zbeekman opened this issue Jun 25, 2015 · 8 comments
Closed

fobs file doesn’t actually build anything #34

zbeekman opened this issue Jun 25, 2015 · 8 comments

Comments

@zbeekman
Copy link
Contributor

I’m trying to integrate this with my project but I am having some issues.

If I try to build with fobos nothing happens. I’m not sure if this is an issue with the fobos file or with FoBiS.py:

$ FoBiS.py build -mode static-gnu
$ tree static
static
├── mod
└── obj

2 directories, 0 files

If I try to build with the included Makefile I get errors: https://gist.github.com/zbeekman/5be2392f0fe05ddcaaa4

If I tell CMake where the Data_Type_Command_Line_Interface.F90 and IR_Precision.F90 files are and try to let CMake’s dependency resolution handle everything else, I get a catastrophic compiler error with gfortran 5.1:

/Users/ibeekman/Sandbox/passmap/FLAP/src/Data_Type_Command_Line_Interface.F90:2406:0:

   if (allocated(rhs%examples)) lhs%examples   = rhs%examples
 ^
internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:1797

/Users/ibeekman/Sandbox/passmap/FLAP/src/Data_Type_Command_Line_Interface.F90:2406:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/Homebrew/homebrew/issues> for instructions.
make[3]: *** [src/CMakeFiles/passmap.dir/__/FLAP/src/Data_Type_Command_Line_Interface.F90.o] Error 4
make[2]: *** [src/CMakeFiles/passmap.dir/__/FLAP/src/Data_Type_Command_Line_Interface.F90.o.provides] Error 2
make[1]: *** [src/CMakeFiles/passmap.dir/all] Error 2
make: *** [all] Error 2
@zbeekman
Copy link
Contributor Author

The problem of the broken Makefile and FoBiS.py not building the library still exists, but I figured out the source of the errors when using CMake… there is a gfortran work around that needs to be enabled with -DGNU… there’s a better way to do this, see here: http://fortranwiki.org/fortran/show/Predefined+preprocessor+macros

Basically you don’t need to pass a user definition to let the source code know which compiler is building it; compilers already include predefined macros to do this. I’ll work up a PR to eliminate this from FLAP which will make it a little bit more robust.

@szaghi
Copy link
Owner

szaghi commented Jun 26, 2015

@zbeekman

It is probably fobos to have not up-to-date contents for building the library (in yhe last weeks I build only the drivers).

Thanks for the PR. By the next hours I will merge your PR and correct the fobos.

@szaghi
Copy link
Owner

szaghi commented Jun 26, 2015

Got it. The fobos file had still the .f90 extension for the library that is now .F90.

The new fobos file has the correct extension.

P.S. note that the makefile provided is for only Test_Driver program: FoBiS.py does not support the production of makefile for building libraries (a new feature request about this on FoBiS.py is now open).

@szaghi szaghi closed this as completed Jun 26, 2015
@zbeekman
Copy link
Contributor Author

Great, thanks so much for fixing this!

@victorsndvg
Copy link

If you are interested, I can try to create a CMake script to compile the FLAP library and executables as two separate targets. This option could coexist with the FoBoS script. What do you think?

@szaghi
Copy link
Owner

szaghi commented Jun 26, 2015

Hi victor,

thank you very much. Yes it is useful.

P.S. the next week our lib will progress...

@zbeekman
Copy link
Contributor Author

I’m not sure there is a need to maintain an additional build script, but
it’s up to you and Stefano. I am adding FLAP to my project with CMake
already and it is very easy to just tell CMake to compile a library from
the two source files.

@szaghi thanks for fixing the fobos file. If I had noticed the filename
extensions issue I would have included it in my PR…

On Fri, Jun 26, 2015 at 7:56 AM victorsndvg notifications@github.com
wrote:

If you are interested, I can try to create a CMake script to compile the
FLAP library and executables as two separate targets. This option could
coexist with the FoBoS script. What do you think?


Reply to this email directly or view it on GitHub
#34 (comment).

@szaghi
Copy link
Owner

szaghi commented Jun 26, 2015

@zbeekman do not worry. Let me know about the -- option

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

3 participants