Running build not from root directory
See original GitHub issueI’ve written some conanfile. It loads a file, check it, unzip and remove:
class IconvConan(ConanFile):
name = "iconv"
version = "1.14"
generators = "cmake"
settings = "os", "arch", "compiler", "build_type"
folder_name = "lib" + name + "-" + version
zip_name = self.folder_name + ".tar.gz"
download("http://ftp.gnu.org/pub/gnu/libiconv/" + zip_name, zip_name)
check_md5(zip_name, "e34509b1623cec449dfeb73d7ce9c6c6")
unzip(zip_name)
os.unlink(zip_name)
You can see it unzipping it in separate directory folder_name
.
When I want to build, I should configure the library in that directory.
def build(self):
env = ConfigureEnvironment(self.deps_cpp_info, self.settings)
self.run(env.command_line + " ./configure --disable-shared --with-pic", cwd=self.folder_name)
self.run(env.command_line + " make", cwd=self.folder_name)
Everything’s fine but windows because ConfigureEnvironment creates bat file which I should execute. Finally I get the error:
iconv/1.14@sbis/stable: WARN: Build folder C:\Users\ma.rybakov\.conan\data\iconv\1.14\sbis\stable\build\367de09a2d03464b27a9f07e2d4bb18479455580
ERROR: iconv: Error 1 while executing call _conan_env.bat ./configure --disable-shared --with-pic
What should I do?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
how to build go outside of source directory? - Stack Overflow
The simplest way is to cd into your module directory ( cd /app ) to run your go build command. (there probably is...
Read more >Allow user to specify root folder for artifacts (#1057) - GitLab
Specify a root directory. Paths/excludes will then match relative to that root. # File on disk is located in <build_dir>/root/dir/file.txt ...
Read more >How to reference a project root directory in an npm script
To execute another command that need to be done in root as for example for gulp! To illustrate here an example "tas:adminApp:build": "cd...
Read more >No opportunity to set relative path to build folder on web service
Everything seems to be fine, redirection logics does work (server is running), but on render tries to find the build folder inside the...
Read more >Build an Image - Specify Dockerfile Location · Codefresh | Docs
You could also change the Docker build context by editing the working_directory property. By default it is looking at the root folder of...
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
You are right, I should have used the initial && too! Don’t know why my code works! Damn Win command line syntax! LOL
A small suggestion, you can pass a conanfile to ConfigureEnvironment():
Shorter, and it also handles some extra cases.
I’ve failed with:
but you helped me. First
&&
is unnecessary. Thanks a lot!