[bug] Makefile won't build successfully
See original GitHub issueEnvironment Details (include every applicable attribute)
- Operating System+version: Ubuntu 20.04
- Compiler+version: g++ 9.3.0
- Conan version: 1.38.0
- Python version: 3.8.10
Steps to reproduce (Include if Applicable)
Follow the official Doc to build with Makefile generator. https://docs.conan.io/en/latest/integrations/build_system/make.html
conanfile.txt
[requires]
poco/1.9.4
[generators]
make
Makefile
#----------------------------------------
# Prepare flags from make generator
#----------------------------------------
include conanbuildinfo.mak
$(call CONAN_BASIC_SETUP)
#----------------------------------------
# Make variables for a sample App
#----------------------------------------
SRCS = main.cpp
OBJS = main.o
EXE_FILENAME = main
#----------------------------------------
# Make Rules
#----------------------------------------
.PHONY : exe
exe : $(EXE_FILENAME)
$(EXE_FILENAME) : $(OBJS)
g++ $(OBJS) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) -o $(EXE_FILENAME)
%.o : $(SRCS)
g++ -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
Code
#include "Poco/MD5Engine.h"
#include "Poco/DigestStream.h"
#include <iostream>
int main(int argc, char** argv)
{
Poco::MD5Engine md5;
Poco::DigestOutputStream ds(md5);
ds << "abcdefghijklmnopqrstuvwxyz";
ds.close();
std::cout << Poco::DigestEngine::digestToHex(md5.digest()) << std::endl;
return 0;
}
Steps
- conan install .
- make exe
Logs (Executed commands with output) (Include/Attach if Applicable)

Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Makefile won't compile correctly - Stack Overflow
1 Answer 1 ... It looks like you're using Linux, so use -pthread instead of -lpthread , and make sure to add it...
Read more >Confusing error, won't build
Any idea why I'm getting this when I try to do a build on a .C file? (Yes I'm a newbie to this...
Read more >Cannot create a C++ Makefile project - Visual Studio Feedback
After installing successfully, reopen vs. Create C++ empty project successfully, then add c++ makefile project successfully. Build this project successfully.
Read more >Can't compile a Release build · Issue #542 - GitHub
looks like that you're trying to build in a filesystem that isn't write enabled by the user. Double check your write permissions just...
Read more >Errors compiling with STMCubeIDE likely because module ...
We were able to successfully compile the firmware this way using the IAR IDE, ... make: *** [makefile:43: 6steps_STEVAL-SPIN3204-2019-11-12.elf] Error 1.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have been checking previous Conan versions down to Conan 1.20.
Apparently, the magic of
$(call CONAN_BASIC_SETUP)was never implemented in this generator, only in the MakeToolchain in https://github.com/conan-io/conan/pull/7430, and then, the documentation was incorrectly changed.So I’d suggest:
CONAN_variables from the generated.makfile into the Makefile itself (this generator was always intended for this usage, completely explicit).Thanks @memsharded ! Have modified Makefile according to the old doc, and it works now!
https://raw.githubusercontent.com/conan-io/docs/release/1.19.0/integrations/build_system/make.rst