openframeworks / openframeworks/openFrameworks

Problem with makefiles and local addons dependencies

Open
#4,799 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

When I use local addons in a project, and when one of the local addon has dependent addons, the makefile seems to append unrelated paths to the dependency paths. For example, I'm using ofxHTTP, which uses a number of dependent addons, and one of them is ofxSSLManager. Here's a snippet of output from make using the MAKEFILE_DEBUG flag:

---OF_PROJECT_DEPENDENCY_FILES---
...
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Global/FileLoader.d
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Guido/GuidoHelper.d
/home/pi/of91a6/addons/obj/linuxarmv6l/Debug/ofxSSLManager/./src/Guido/GmnSvgStrOps.d
...

The parts after ./ are some of my source files that are completely unrelated to the addon. It does that for every addon that is a dependent of a local addon. The makefile seems to assume they are in the default addons folder, even though they are added to the local addons folder (specified in addons.make using relative paths). Top level addons seem to be fine.

If I put the addons in the normal OF_ROOT/addons directory, then it seems to be working fine. I'm trying to compile the project under Raspbian using the default Makefile.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the build on Raspbian with local addon paths in addons.make and MAKEFILE_DEBUG enabled, using the default Makefile. Trace how dependency paths are assembled for dependent addons and verify that the generated paths point to the dependent addon sources rather than unrelated files; a successful corrected build is the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, raspberry-pi
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.