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

make impl Command Not Recognized #21

Closed
brhs17 opened this issue Feb 18, 2019 · 33 comments
Closed

make impl Command Not Recognized #21

brhs17 opened this issue Feb 18, 2019 · 33 comments

Comments

@brhs17
Copy link

brhs17 commented Feb 18, 2019

My name is Benjamin and I am a new member on Cornell Cislunar Explorers. I have been working thorough the math component tutorial, and at step 2.4.1 I cannot get the make impl command to create any stubs.

I run the command in the Ref/MathSender directory, and get the result:

make: *** No rule to make target 'impl'. Stop.

I built the component without any problems, and have failed to find anything like misnamed files.

@ljreder
Copy link
Collaborator

ljreder commented Feb 19, 2019

Perhaps try executing make gen_make and then retry the target. I do not have it in front of me now but this might work ok.

@timcanham
Copy link
Collaborator

@brhs17: Do you have the Makefile file in that directory? I'm looking at the tutorial and it doesn't explicitly tell you to put the file there. See section 2.1.1.3 at the description of the second make file that goes into each directory. This make file is not necessary for the overall builds, but provides some convenience targets local to the module directory so you don't have to keep jumping back and forth between the module directory and the directory where you build the deployment. If you create the make file in section 2.1.1.3 and make the variable MODULE_DIR equal to Ref/MathSender, the make impl target should work. We need to update the tutorial to add this step to create Makefile in each directory.

Here is what the Makefile should look like:

# derive module name from directory

MODULE_DIR = Ref/MathSender
MODULE = $(subst /,,$(MODULE_DIR))

BUILD_ROOT ?= $(subst /$(MODULE_DIR),,$(CURDIR))
export BUILD_ROOT

include $(BUILD_ROOT)/mk/makefiles/module_targets.mk

@brhs17
Copy link
Author

brhs17 commented Feb 22, 2019

@timcanham The missing makefile was the problem.
Thank you.

@LeStarch
Copy link
Collaborator

Closing.

@julia861127
Copy link

I tried to add a makefile in my sender directory, however, when I tried make impl again, it shows the message: Makefile:9: %(CURDIR)/mk/makefiles/module_targets.mk: No such file or directory

@LeStarch LeStarch reopened this Feb 24, 2019
@LeStarch
Copy link
Collaborator

In your makefile, make sure the line:

MODULE_DIR = ...

Is updated for the location of your module. Also, typically, %(CURDIR) is %(BUILD_ROOT)/ in our Makefiles.

If this doesn't help, can you post your full makefile here for us to help debug?

@julia861127
Copy link

julia861127 commented Feb 25, 2019

This is the makefile I wrote for my module. And it's saved in Ref/EPSPower/EPSPowerSender, which is the directory I created for my component.
screenshot from 2019-02-24 17-43-26

# derive module name from directory

MODULE_DIR = Ref/EPSPower/EPSPowerSender
MODULE = $(subst /,,$(MODULE_DIR))

BUILD_ROOT ?= $(subst /$(MODULE_DIR),,%(CURDIR))
export BUILD_ROOT

include $(BUILD_ROOT)/mk/makefiles/module_targets.mk

@LeStarch
Copy link
Collaborator

This Makefile expects to see the directory EPSPowerSender at fprime/Ref/EPSPower/EPSPowerSender, where fprime is the base of your F´ install. Make sure the above Makefile is in that directory.

@julia861127
Copy link

Yes, the above makefile is in the fprime/Ref/EPSPower/EPSPowerSender directory, but the make impl was not working with the message shown above.

@timcanham
Copy link
Collaborator

I think you need to change %(CURDIR) to $(CURDIR).

@wr3484
Copy link

wr3484 commented Mar 9, 2019

I am on section 2.1.1.3 of the tutorial, and continue to receive this:
image

    MODULE_DIR = Ref\MathPorts
    MODULE = $(subst /,,$(MODULE_DIR))
    BUILD_ROOT ?= $(subst /$(MODULE_DIR),,$(CURDIR))
    export BUILD_ROOT
    include $(BUILD_ROOT)/mk/makefiles/module_targets.mk

@timcanham
Copy link
Collaborator

Is the above Makefile.mk? If so, it should be Makefile so make automatically finds it. Alternatively, make -f Makefile.mk gen_make

@wr3484
Copy link

wr3484 commented Mar 9, 2019

Thank you for clarifying that, after I changed it though I am still not able to build.
image

@timcanham
Copy link
Collaborator

It can't find Cheetah. Based on the path, it looks like you may be trying the Cygwin build? Fix the path in /mk/configs/host/CYGWIN-generic.mk. Fix it to cheetah-compile with no path. If you installed it, it should be in your path.

@wr3484
Copy link

wr3484 commented Mar 10, 2019

Another error after running. I installed cheetah through a pip install, here's the location:

image

C:\Python27\Scripts
image

@timcanham
Copy link
Collaborator

Yes, you found the correct file. Comment in line five.

@timcanham
Copy link
Collaborator

If you are using cygwin, it would be in your cygwin path, not the Windows install. You need to pip install from the cygwin shell.

@wr3484
Copy link

wr3484 commented Mar 10, 2019

After running a pip install of cheetah from my CYGWIN terminal everything worked. THANK YOU.

@wr3484
Copy link

wr3484 commented Mar 11, 2019

Attempting to run the Demo from fPrime Manual and having build errors using make, using CYGWIN and have installed all needed packages.

image

image

@rdaruwala
Copy link
Contributor

@wr3484 It looks like your make command is attempting to build for LINUX instead of CYGWIN. Could you try running make CYGWIN and see if that helps?

@timcanham
Copy link
Collaborator

It also looks like the version encoder doesn't like it if there are no commits yet. Is this just a copy of the source rather than a fork? At any rate, do at least one commit of the code. We should make it more robust to non-git copies, however.

@wr3484
Copy link

wr3484 commented Mar 11, 2019

The make CYGWIN command worked, now it is not recognizing Tkinter? I have python 2.7 and 3.7 installed, will having both installed cause problems with recognizing Tkinter and tkinter?
image

@timcanham
Copy link
Collaborator

One of our efforts that will be in a future update for F' will be advancing Python to 3.x, but for now it requires 2.x. I haven't really tried running with both yet.

@timcanham
Copy link
Collaborator

Also, Cygwin isn't a supported platform. We support Linux and MacOS. We used to support Cygwin, but in the last year or so switched to WSL for Windows. If you want to do PRs with Cygwin fixes, we'll accept them, but they will be as-is.

@brhs17
Copy link
Author

brhs17 commented Mar 15, 2019

I am trying to make my own component and am getting this error when I try to make impl
MakeImplRecipeError

@rdaruwala
Copy link
Contributor

In your CLEMOpsComponentAi.xml file, line 46, ACTIVITY_HIGH should be ACTIVITY_HI

@brhs17
Copy link
Author

brhs17 commented Mar 15, 2019

I fixed that error, but there are more. Is there anyway to figure out where the recipe failed?

@rdaruwala
Copy link
Contributor

rdaruwala commented Mar 15, 2019

I was able to generate template files for your component after fixing that one error. Are you still having issues generating those files, or are you trying to make something else?

Regarding your question, when I first tried running make impl on your code, I received a different error message:

XML file CLEMOpsComponentAi.xml is not valid according to schema fprime/Autocoders/schema/default/component_schema.rng.
Extra element events in interleave
<string>:0:0:ERROR:RELAXNGV:RELAXNG_ERR_INTEREXTRA: Extra element events in interleave
fprime/Ref/CLEMOps/CLEMOpsComponentAi.xml:1:0:ERROR:RELAXNGV:RELAXNG_ERR_CONTENTVALID: Element component failed to validate content
fprime/Ref/CLEMOps/CLEMOpsComponentAi.xml:1:0:ERROR:RELAXNGV:RELAXNG_ERR_CONTENTVALID: Element component failed to validate content
<lxml.etree._ElementTree object at 0x7fd26de94a70>
Traceback (most recent call last):
  File "fprime/Autocoders/bin/codegen.py", line 1125, in <module>
    main()
  File "fprime/Autocoders/bin/codegen.py", line 1086, in main
    the_parsed_component_xml = XmlComponentParser.XmlComponentParser(xml_filename)
  File "fprime/Autocoders/src/parsers/XmlComponentParser.py", line 104, in __init__
    raise e
AssertionError: Extra element events in interleave

Maybe try appending VERBOSE=1 to your make command. I think you might be running into a different error (earlier in the make process) than I am. Seems to be having an error finding a rule to make your template files

@brhs17
Copy link
Author

brhs17 commented Mar 15, 2019

I still get the same error and error message after fixing ACTIVITY_HI and adding VERBOSE=1
MakeImplRecipeError2

@timcanham
Copy link
Collaborator

Some basic questions:

  1. Did you add CLEMOps to mk/configs/modules/modules.mk?
  2. Did you invoke make gen_make after you added CLEMOps to 1)?

@brhs17
Copy link
Author

brhs17 commented Mar 18, 2019

Thank you, I forgot to invoke make gen_make.

@brianthespoon
Copy link

brianthespoon commented Mar 18, 2019 via email

@brhs17
Copy link
Author

brhs17 commented Mar 22, 2019

How do I find errors in my XML files? My debug response tells me which file is wrong, but nothing about where it is wrong, always saying something like extra element events in interleave

@brhs17 brhs17 closed this as completed Mar 28, 2019
r9-pena added a commit to r9-pena/fprime that referenced this issue Jul 20, 2021
LeStarch pushed a commit that referenced this issue Aug 4, 2021
* Create tutorial-support.yml

* Update tutorial-support.yml

GpsApp tutorial to be pulled for build test and submodules to be pulled recursively

* Implementation of tutorial workflow

* typo in repo address

* Added missing github action file

* Changed workflow path

* Changed dir paths

* Work around for workflow

* work around

* troubleshooting

* troubleshoot

* troubleshoot

* Performance update

* Path correction

* troubleshoot

* Dockerfile correction

* path change

* path change

* path fix

* path fix

* path fix

* path fix

* paht fix

* Revert to changes

* Completed workflow for tutorial support

* troubleshoot

* Build path error

* Optimization of workflow

* Path fix

* Path fix

* Path fix #1

* path fix #2

* path check

* Workflow test

* Workflow test #2

* Added logging feature

* Logs Troubleshoot

* Typo fix

* Troubleshoot #1

* Troubleshoot #2

* Corrected typo on path

* Troubleshoot #3

* Troubleshoot #4

* Troubleshoot #5

* Removed log archive feature

* Changed repo path to conform pull request merge

* Test run #1

* test #2

* test #3

* added branch for workflow test

* test #4

* test #4

* test #5

* test #6

* Test #7

* test #8

* test #8

* Test #9

* Test #9

* Test #10

* Test #11

* Test #12

* Test #13

* Test #14

* Test #15

* Test #16

* Test #17

* Test #18

* Test #20

* Test #21

* Test #22

* Test #23

* Test #24

* Test #25

* Split test files

* Split tests #2

* Added executable permissions

* Delete RPI.bash

* Delete Ref.bash

* Delete Framework.bash

* exe files

* Make Framework.bash executable

* Make RPI.bash and Ref.bash executable

* Test #26

* Test #27

* Test #28

* Attached Integration test to Ref test

* Test #29

* Test #30

* Test #31

* Test #32

* Test #33

* Test #34

* Test #35

* Test #35

* Test #37

* Test #38

* Test #39

* Test #40

* Test #41

* Test #42

* Test #43

* Test #43

* Test #44

* Test #45

* Cleaned up files to remove commented code

* Remove CI test branch from workflow

* Incorporated comments for PR

* Modified path for framework job test

* Incoporate reviewer comment for PR

* Incoporated reviewer comment for PR

* Was using incorrect directory for the test

* Revised args call for jobs

* Passing args #1

* Define entrypoint directly from workflow

* Changed entrypoint method

* Changed entrypoint method #2

* Corrected test path

* Syntax correction

* Path Test #1

* Path test #2

* Path Test #4

* Path Test $5

* Test Path #6

* Path Test #6

* Path Test #7

* Path Test #8

* Refactored scripts to remove master.bash

* Corrected test path

* Fixed log problems

* Entrypoint alternative

* Bypassed master.bash file

* Added line for better CI error messages
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

8 participants