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

Run make dep strictly before make $(TARGET) puzzle #40

Closed
cschol opened this issue Mar 24, 2018 · 14 comments
Closed

Run make dep strictly before make $(TARGET) puzzle #40

cschol opened this issue Mar 24, 2018 · 14 comments

Comments

@cschol
Copy link

cschol commented Mar 24, 2018

Compilation from a fresh checkout fails when using parallelized build with the -j argument.

Maybe the problem is, that the dependencies are build in parallel with the code files and some code files may need the dependencies, but they are not build yet?

Running just make works fine, running make -j 4 does not.

@AScustomWorks has the same problem as he is using the same Makefile recipe to build his dependencies.

@AScustomWorks
Copy link

AScustomWorks commented Mar 24, 2018

Indeed, I updated the 2 delay modules to match Fundamental's code and makefile too.
Just tried make -j4, got this error:

src/DelayPlus.cpp:10:10: fatal error: 'samplerate.h' file not found #include "samplerate.h"
makealone works ok as @cschol said
Is just matter of building the dependencies first, right? (but makefile changes are way over my skills) This way is neater than make dep, make though.

@AndrewBelt AndrewBelt changed the title Build fails with -j 4 argument Run make dep strictly before make $(TARGET) puzzle Mar 25, 2018
@AndrewBelt
Copy link
Member

Try 03c14d5bb6b6076a91070b0b90c8366cdd50abbc in Rack and c9142a8 in Fundamental
This makes dep a target of all object files.

@cschol
Copy link
Author

cschol commented Mar 25, 2018

Works now for both Fundamental and @AScustomWorks with make -j 4. Thank you!

@cschol cschol closed this as completed Mar 25, 2018
@cschol cschol reopened this Mar 25, 2018
@cschol
Copy link
Author

cschol commented Mar 25, 2018

Sorry, it doesn't work. I didn't do a pull on Fundamental before I tested.

@cschol
Copy link
Author

cschol commented Mar 25, 2018

@AndrewBelt Looks like a botched merge? For some reason 343b666 did not make it in the final Makefile version (the shell command that created the dep directory is not in the Makefile).

Result:

cd dep && curl -OL http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz
/bin/sh: 1: cd: can't cd to dep
Makefile:18: recipe for target 'dep/lib/libsamplerate.a' failed
make: *** [dep/lib/libsamplerate.a] Error 2

@cschol
Copy link
Author

cschol commented Mar 25, 2018

Another issue: Fundamental (and @AScustomWorks) plugins don't load.

[0.032 warn] Failed to load library ./plugins/Fundamental/plugin.so: ./plugins/Fundamental/plugin.so: undefined symbol: src_delete
[0.045 warn] Failed to load library ./plugins/AS/plugin.so: ./plugins/AS/plugin.so: undefined symbol: src_delete

@AndrewBelt
Copy link
Member

AndrewBelt commented Mar 25, 2018

Try 1878e96 of Rack

@cschol
Copy link
Author

cschol commented Mar 25, 2018

Builds and loads for both plugins now. Thank you!

@cschol
Copy link
Author

cschol commented Mar 25, 2018

@AndrewBelt The Makefile is still a problem. It does not create the dep directory if it is not already there. Fails on all platforms if dep is not there. Take a look at the Makefile in the latest revision. The merge took out the $(shell mkdir -p dep) line although one of the commits had it in there.

I didn't notice since make clean does not remove dep (not that it should). Only git clean -dfx does.

@AndrewBelt
Copy link
Member

Fixed in 0543c35

make clean should not remove dependencies.

@cschol
Copy link
Author

cschol commented Mar 25, 2018

@AndrewBelt Agreed on make clean. I ran the wrong command and it did not remove dep.

Sorry, this does not work. The variable CONFIGURE is initialized when dep does not exist yet, so the --prefix argument has the wrong value, because realpath on a non-existing directory returns an empty string.

You could remove the ":" from CONFIGURE in dep.mk to defer initialization until it is used in Fundamental's Makefile.

@AndrewBelt
Copy link
Member

aaf7473

@cschol
Copy link
Author

cschol commented Mar 25, 2018

@AndrewBelt Oh, yes. That's a better fix. Tested on Linux and it works.

Now, on Windows, libsamplerate compilation fails. This seems to be a different issue (possibly related to libsamplerate itself) and I'll open a separate issue to track.

@cschol
Copy link
Author

cschol commented Mar 25, 2018

The Windows compilation issue is same as #38.

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

3 participants