lkujaw / felix

X/Open Native Language System (NLS) for Ada
Other
0 stars 0 forks source link

Is GNU/Linux supported? #1

Closed mgrojo closed 3 years ago

mgrojo commented 3 years ago

I tried to compile the example in Linux but the makefile has syntax not supported by GNU make, so I didn't go further testing the library. Will it work under Linux? Do I need to use some other edition of make available under Linux?

lkujaw commented 3 years ago

Hi Manuel,

Sorry for the delay in responding. You should be able to build the library under Linux with either Alire or my fork of AST NMAKE with Ada support (not GNU make compatible, sorry), and I've updated the README with a link. Let me know if you encounter any difficulties. Hopefully over the next few weeks I'll finish writing a utility for Felix that generates Ada specifications with the appropriate message IDs.

Kind regards, Lev

mgrojo commented 3 years ago

Thanks, don't worry, there was no delay.

It is then not usable with only Alire and gprbuild? The library can be build using Alire, but then I'm not sure if it can be using Alire. I wanted to compile the example, so I could get source code navigation to understand it. I tried to convert the example to an Alire crate and "with" the felix crate, but apparently, there is no gpr file to use the crate as a library.

After these commands:

alr init --bin example1
mv example1.adb example1/src
alr with felix
alr build

I get these errors:

Setup                                            
   [mkdir]        object directory for project Felix
   [mkdir]        library directory for project Felix
Compile
   [Ada]          example1.adb
   [C]            cio.c
   [C]            nls.c
   [Ada]          cstandio.adb
example1.adb:35:06: file "c_standard_io.ads" not found
example1.adb:36:06: file "native_language_system.ads" not found
example1.adb:38:06: file "standard_text.ads" not found
example1.adb:39:05: "Standard_Text" is undefined
example1.adb:43:24: "C_Standard_IO" is undefined
example1.adb:44:24: "Native_Language_System" is undefined
example1.adb:53:22: object "NLS" cannot be used before end of its declaration
example1.adb:54:22: object "NLS" cannot be used before end of its declaration
example1.adb:57:36: "Text_T" is undefined
example1.adb:60:07: object "CIO" cannot be used before end of its declaration
example1.adb:65:04: object "NLS" cannot be used before end of its declaration
example1.adb:67:07: object "NLS" cannot be used before end of its declaration
example1.adb:69:12: object "NLS" cannot be used before end of its declaration
example1.adb:70:10: object "CIO" cannot be used before end of its declaration
example1.adb:76:16: "Text" is undefined (more references follow)
example1.adb:76:65: "New_Line" is undefined (more references follow)
example1.adb:80:27: "Raw" is undefined (more references follow)
example1.adb:84:29: invalid operand types for operator "&"
example1.adb:89:30: "Thousands_Grouping" is undefined (more references follow)
example1.adb:92:30: "Positive_Sign" is undefined
example1.adb:93:11: "Integer_L" is undefined
example1.adb:96:32: "Precision" is undefined
example1.adb:98:04: object "NLS" cannot be used before end of its declaration
example1.adb:99:04: object "NLS" cannot be used before end of its declaration

   compilation of example1.adb failed

gprbuild: *** compilation phase failed
error: Command ["gprbuild", "-gnatwU", "-j0", "-p", "-P", "example1.gpr"] exited with code 4
error: Compilation failed.

I suppose a library crate in the Alire index should support that workflow.

lkujaw commented 3 years ago

Thanks for pointing this out, I hadn't noticed this problem before because I always use -gnatk8 to reduce Ada filenames. Let me know if the new GPR project file that I committed helps.

mgrojo commented 3 years ago

Thanks, it has worked now with the new gpr file, and I was able to compile the example and navigate through it with emacs. I'll let you know if I finally use the library.