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

Binary Linking Error #12

Closed
ErynQian opened this issue Oct 16, 2018 · 4 comments
Closed

Binary Linking Error #12

ErynQian opened this issue Oct 16, 2018 · 4 comments

Comments

@ErynQian
Copy link

ErynQian commented Oct 16, 2018

What might be the reason that "make ac_lvl1 ac_lvl2 ac_lvl3 ac_lvl4 " runs to completion but "make all" fails with a lot of "undefined reference to xxx" errors?

For more specific details:

  1. We wrote a HelloWorld App which is very similar to MathComponent and its config in modules.mk is as follows:
HELLOWORLD_MODULES := \
	HelloWorld/Top \
	HelloWorld/HelloTypes \
	HelloWorld/HelloPorts \
	HelloWorld/RecvBuffApp \
	HelloWorld/SendBuffApp \
	HelloWorld/SignalGen \
	HelloWorld/PingReceiver \
	HelloWorld/HelloSender \
	HelloWorld/HelloReceiver
	
HelloWorld_MODULES := \
	\
	$(HELLOWORLD_MODULES) \
	\
	$(SVC_MODULES) \
	\
	$(DEMO_DRV_MODULES) \
	\
	$(FW_MODULES) \
	\
	$(OS_MODULES) \
	\
	$(CFDP_MODULES) \
  	\
  	$(UTILS_MODULES)
  1. All libraries compiled successfully and all individual components passes the unit tests. But upon 'make all', the components seem to have trouble linking to the definitions of ports and types.
  2. Error message:
    error.log
@timcanham
Copy link
Collaborator

Something funny is going on in the makefile:

make[1]: Entering directory '/home/eryn/fprime/HelloWorld'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12377: warning: overriding recipe for target '/home/eryn/fprime/HelloWorld/HelloTypes/linux-linux-x86-debug-gnu-bin/HelloSerializableAc.o'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12372: warning: ignoring old recipe for target '/home/eryn/fprime/HelloWorld/HelloTypes/linux-linux-x86-debug-gnu-bin/HelloSerializableAc.o'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12440: warning: overriding recipe for target '/home/eryn/fprime/HelloWorld/HelloPorts/linux-linux-x86-debug-gnu-bin/HelloPortAc.o'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12435: warning: ignoring old recipe for target '/home/eryn/fprime/HelloWorld/HelloPorts/linux-linux-x86-debug-gnu-bin/HelloPortAc.o'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12445: warning: overriding recipe for target '/home/eryn/fprime/HelloWorld/HelloPorts/linux-linux-x86-debug-gnu-bin/HelloBackPortAc.o'
/home/eryn/fprime/mk/makefiles/bin_targets.mk:12430: warning: ignoring old recipe for target '/home/eryn/fprime/HelloWorld/HelloPorts/linux-linux-x86-debug-gnu-bin/HelloBackPortAc.o'
Building LINUX

@timcanham
Copy link
Collaborator

Can you post the mod.mk file for /home/eryn/fprime/HelloWorld/HelloTypes?

@timcanham
Copy link
Collaborator

I think the undefined symbols are due to link order. The order in HELLOWORLD_MODULES is used as the link order.

	HelloWorld/HelloTypes \
	HelloWorld/HelloPorts \

are listed before:

	HelloWorld/HelloSender \
	HelloWorld/HelloReceiver

Try reversing the order.

@ErynQian
Copy link
Author

That works.Thank you so much!

r9-pena added a commit to r9-pena/fprime that referenced this issue Jul 15, 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

2 participants