All,

Since I already have Java on my machine all I needed to do was include the path 
in the MSYS2 terminal (on top of adding the sbt path). I did some testing with 
and without valid changes and I am receiving expected results, so I believe I 
am in a good state to progress. Thank you all for the help!

Something interesting I found to note is: If you can successfully compile once 
in the MSYS2 terminal, it appears that Powershell is able to compile as 
expected. 

Steps I took to resolve the problem:
1. Add sbt to PATH variable in MSYS2 terminal (export PATH=$PATH:pathOfSbt)
2. Add Java to PATH variable in MSYS2 terminal (export PATH=$PATH:pathOfJava)
(This just adds sbt and Java temporarily. I need to figure out a way to 
permanently add the two to the PATH variable so that I don't need to add them 
each time I start a MSYS2 terminal.)

Best,

Varun

-----Original Message-----
From: Steve Lawrence <[email protected]> 
Sent: Thursday, May 26, 2022 6:10 AM
To: [email protected]
Subject: Re: Initial Compilation Errors

[You don't often get email from [email protected]. Learn why this is 
important at https://aka.ms/LearnAboutSenderIdentification.]

Daffodil claims to support building on Windows, with build instructions in our 
README. I would suggest we not give up by switching to Linux, and instead to 
try resolve this problem. It likely means part of our build instructions are 
either incorrect or unclear. It would be valuable to get this resolved.

Varun, I *think* you may need to run the commands in MSYS2, I don't think we 
currently support powershell.

Based on the error you got in MSYS2, it sounds like you need to install Java, 
we usually suggest downloading and installation OpenJDK following the 
instructions here:

https://adoptopenjdk.net/

On 5/25/22 4:29 PM, Sood, Harinder wrote:
> Varun,
>     Please use Linux, You can request a VM for Linux from IT, but get 
> guidance from Steve Lawrence.
>
>
>
> Sincerely,
>    Harinder Sood |Director (Program Manager)
>
> [email protected]
> M          240 805 4219
> Work: 410 290-1411 x122
> Connect with us!
>
>
>
> The information contained in this transmission is for the personal and 
> confidential use of the individual or entity to which it is addressed. 
> If the reader is not the intended recipient, you are hereby notified 
> that any review, dissemination, or copying of this communication is 
> strictly prohibited. If you have received this transmission in error, 
> please notify the sender immediately
>
>
> -----Original Message-----
> From: Zaver, Varun <[email protected]>
> Sent: Wednesday, May 25, 2022 4:13 PM
> To: [email protected]
> Subject: Initial Compilation Errors
>
> Hello,
>
> I have recently joined the effort to work on apache/daffodil. I am trying to 
> work an open issue; however, I am running into compilation errors on a clone 
> of apache/daffodil that I have made no changes to. I am working on a Windows 
> computer and the steps I have followed are listed below:
>
> Steps:
>
>    1.  Fork apache/daffodil
>    2.  Clone the forked repository to local machine
>    3.  Follow the instructions in the BUILD.md file (all steps below were 
> done in a MSYS2 window)
>       *   Run "pacman -S clang diffutils gcc git make pkgconf"                
>                      -- Succeeded
>       *   Run "export CC=clang AR=llvm-ar"                                    
>                                    -- Succeeded
>       *   Run "git clone -b v3.3 https://github.com/michaelrsweet/mxml.git
>
>                 unset CC AR
>
>                 cd mxml
>
>                 ./configure --prefix=/usr --disable-shared 
> --disable-threads
>
>                 make
>
>                 make install
>
> "                                                                             
>                                                         --Succeeded
>
>       *   Run "export MSYS2_PATH_TYPE=inherit"                                
>                             --Succeeded
>
> Error(s):
>
>    1.  Powershell/IDE Compiling
> When I run "sbt compile" within an IDE that has the daffodil directory open, 
> the error I receive is:
> "(daffodil-runtime2 / Compile / cCompile) java.io.IOException: Cannot run 
> program "cc": CreateProcess error=2, The system cannot find the file 
> specified"
>
> I had set my environment variable "CC" to  "clang" and "AR" to "llvm-ar", 
> however I receive the same error as before but the "cc" is changed to "clang" 
> in the error message.
>
> I have downloaded LLVM-11.0.0-win64 in an attempt to have clang downloaded 
> but I do not think I have done this correctly since "clang" is not a 
> recognized command in Powershell.
>
>
>    1.  MSYS2 Compiling
> When I run "sbt compile" from the MSYS2 window, I receive a "sbt command not 
> found". As such, I had added sbt to the PATH variable and received these 
> errors:
> /c/Program Files (x86)/sbt/bin/sbt: line 453: java: command not found
>
> copying runtime jar...
>
> mkdir: cannot create directory '': No such file or directory
>
> /c/Program Files (x86)/sbt/bin/sbt: line 460: java: command not found
>
> /c/Program Files (x86)/sbt/bin/sbt: line 220: java: command not found
>
> Has anyone ran into similar issues? I appreciate any help and apologize for 
> any novice mistakes I have made.
>
> Thanks!
>
> Best,
> Varun

Reply via email to