No rule to make target `distclean'. Stop when compile openresty - linux

When I am using this command to compile Openresty(1.13.6.2):
# configure openresty
./configure --with-pcre=/usr/local/pcre-8.43 --with-openssl=/usr/local/openssl-1.0.2r --with-zlib=/usr/local/lib
# make openresty
gmake
When execute this command,it throws this error:
gmake[1]: Entering directory `/usr/local/openresty-1.13.6.2/build/lua-rds-parser-0.06'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/usr/local/openresty-1.13.6.2/build/lua-rds-parser-0.06'
cd /usr/local/openresty-1.13.6.2/build/nginx-1.13.6 && gmake
gmake[1]: Entering directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake -f objs/Makefile
gmake[2]: Entering directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
cd /usr/local/lib \
&& gmake distclean \
&& CFLAGS="-O2 -fomit-frame-pointer -pipe " CC="cc" \
./configure \
&& gmake libz.a
gmake[3]: Entering directory `/usr/local/lib'
gmake[3]: *** No rule to make target `distclean'. Stop.
gmake[3]: Leaving directory `/usr/local/lib'
gmake[2]: *** [/usr/local/lib/libz.a] Error 2
gmake[2]: Leaving directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/usr/local/openresty-1.13.6.2/build/nginx-1.13.6'
gmake: *** [all] Error 2
Where is going wrong? How to fix this problem?

Use zlib source code folder to configure:
./configure --with-pcre=/usr/local/pcre-8.43 --with-openssl=/usr/local/openssl-1.0.2r --with-zlib=/usr/local/zlib2.8-src
using the source folder,not the install output folder.

Related

Error during make gcc: "cp: Permission denied"

What I did
In my initially empty build directory, I configure gcc with
/home/anthony/Documents/gcc-pi/gcc/configure --prefix=/opt/gcc --enable-multilib --disable-shared --enable-static --disable-bootstrap --disable-libstdcxx-pch --enable-languages=all --enable-libgomp --enable-threads=posix --enable-tls --with-system-zlib --with-isl --enable-__cxa_atexit --enable-host-shared CFLAGS='-lpthread -fPIC' CXXFLAGS='-lpthread -fPIC' CPPFLAGS='-fPIC'
I then issue make and after some successful building, the build ultimately fails with the following
make[2]: Entering directory '/home/anthony/Documents/gcc/gcc'
mkdir -p ada/bldtools/sinfo
rm -f ada/bldtools/sinfo/sinfo.ads ada/bldtools/sinfo/sinfo.adb ada/bldtools/sinfo/xsinfo.adb ada/bldtools/sinfo/csinfo.adb
cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfo
make[2]: cp: Permission denied
make[2]: *** [/home/anthony/Documents/gcc-pi/gcc/gcc/ada/Make-generated.in:44: ada/sinfo.h] Error 127
make[2]: Leaving directory '/home/anthony/Documents/gcc/gcc'
make[1]: *** [Makefile:4411: all-gcc] Error 2
make[1]: Leaving directory '/home/anthony/Documents/gcc'
make: *** [Makefile:970: all] Error 2
What I tried
I've tried
sudo make
sudo chmod 777 -R the gcc source and build directories
sudo cp -p /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.ads /home/anthony/Documents/gcc-pi/gcc/gcc/ada/sinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/xsinfo.adb /home/anthony/Documents/gcc-pi/gcc/gcc/ada/csinfo.adb ada/bldtools/sinfod ```
all of which failed at advancing the build. Note that the last command succeeds, but when I try to continue the build after that, it yields the same error.
Any ideas? Thanks in advance.
Had same issue. Looks like the problem relates to gcc package due to the fact that it contains "cp" directory. Solution was found in "https://aur.archlinux.org/packages/libgccjit/?O=10&PP=10". In my case i had "." folder in my PATH environment variable. Removing it made compilation process to continue.
Edit ./gcc/Makefile
replace cp with /usr/bin/cp

`make release_tests` fails after ./configure in fresh Erlang installation

I cloned, make, ./configure then make release_tests
There is a ./make/target.mk in the root otp directory but not in ./lib/common_test/test_server
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/
config.guess configure.in install-sh ts_benchmark.erl ts_erl_config.erl ts_install.erl ts_run.erl
config.sub conf_vars.in Makefile ts.config ts.hrl ts_lib.erl ts.unix.config
configure cross.cover ts_autoconf_win32.erl ts.erl ts_install_cth.erl ts_make.erl ts.win32.config
root#marble-pyramid-1:~/download/otp_src_20.0# ls lib/common_test/test_server/make
ls: cannot access lib/common_test/test_server/make: No such file or directory
EDIT:
root#marble-pyramid-1:~/download/otp_src_20.0# ERL_TOP=$HOME/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# echo $ERL_TOP
/root/download/otp_src_20.0
root#marble-pyramid-1:~/download/otp_src_20.0# make release_test
make: *** No rule to make target `release_test'. Stop.
root#marble-pyramid-1:~/download/otp_src_20.0# make release_tests
if test -f lib/common_test/test_server/Makefile; then \
(cd lib/common_test/test_server; make TESTROOT="/root/download/otp_src_20.0/release/tests" \
PATH=/root/download/otp_src_20.0/bin/:/root/download/otp_src_20.0/bootstrap/bin:"${PATH}" release_tests) || exit $?; \
fi
make[1]: Entering directory `/root/download/otp_src_20.0/lib/common_test/test_server'
Makefile:21: /make/target.mk: No such file or directory
Makefile:26: /make/x86_64-unknown-linux-gnu/otp.mk: No such file or directory
Makefile:85: /make/otp_release_targets.mk: No such file or directory
make[1]: *** No rule to make target `/make/otp_release_targets.mk'. Stop.
make[1]: Leaving directory `/root/download/otp_src_20.0/lib/common_test/test_server'
make: *** [lib/common_test/test_server] Error 2
root#marble-pyramid-1:~/download/otp_src_20.0#
The question says the OP ran make, then ./configure, then make release_tests, but this is incorrect; one always runs configure before make.
Building the release_tests target succeeded using the following steps in bash on a Mac running macOS Sierra 10.12.6:
$ curl -LO http://erlang.org/download/otp_src_20.0.tar.gz
$ tar xf otp_src_20.0.tar.gz
$ cd otp_src_20.0
$ export ERL_TOP=$PWD
$ ./configure
$ make -j16
$ make release_test
I'm sure this would work on Linux or any other UNIX variant as well.

Building Swift SourceKit on Linux

https://github.com/apple/swift/pull/3594#issuecomment-234169759
$ utils/build-script --libdispatch
$ utils/build-script --libdispatch --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT:BOOL=TRUE"
Looks like the second command does nothing to build the SourceKit. No binary created in build directory. Any advice what to do?
jara#jara-pc:~/swift-source/swift$ utils/build-script --libdispatch --extra-cmake-options="-DSWIFT_BUILD_SOURCEKIT:BOOL=TRUE"
+ mkdir -p /home/jara/swift-source/build/Ninja-DebugAssert
+ env HOST_VARIABLE_linux_x86_64__SWIFT_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_RUN_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_SDKS=LINUX HOST_VARIABLE_linux_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-linux-x86_64 HOST_VARIABLE_linux_x86_64__SWIFT_TEST_TARGETS= /home/jara/swift-source/swift/utils/build-script-impl --workspace /home/jara/swift-source --build-dir /home/jara/swift-source/build/Ninja-DebugAssert --install-prefix /usr --host-target linux-x86_64 --stdlib-deployment-targets linux-x86_64 --host-cc /usr/bin/clang --host-cxx /usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/local/bin/cmake --cmark-build-type Debug --llvm-build-type Debug --swift-build-type Debug --swift-stdlib-build-type Debug --lldb-build-type Debug --foundation-build-type Debug --libdispatch-build-type Debug --xctest-build-type Debug --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++' --build-args=-j4 --cmark-cmake-options= '--llvm-cmake-options=-DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64;PowerPC;SystemZ' --swift-cmake-options= --libdispatch-cmake-options= --build-stdlib-deployment-targets all --ninja-bin=/usr/bin/ninja --skip-build-foundation --skip-build-xctest --skip-build-lldb --skip-build-llbuild --skip-build-swiftpm --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-swift --skip-test-cmark --skip-test-lldb --skip-test-llbuild --skip-test-swiftpm --skip-test-xctest --skip-test-foundation --skip-test-libdispatch --skip-test-playgroundlogger --skip-test-playgroundsupport --skip-test-linux --skip-test-freebsd --skip-test-cygwin --skip-test-osx --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --extra-cmake-options=-DSWIFT_BUILD_SOURCEKIT:BOOL=TRUE --llvm-lit-args=-sv
Building the standard library for: swift-test-stdlib-linux-x86_64
cmark: using gold linker
+ rm -rf /home/jara/swift-source/build/Ninja-DebugAssert/cmark-linux-x86_64/module-cache
+ mkdir -p /home/jara/swift-source/build/Ninja-DebugAssert/cmark-linux-x86_64/module-cache
+ /usr/local/bin/cmake --build /home/jara/swift-source/build/Ninja-DebugAssert/cmark-linux-x86_64 -- -j4 all
ninja: no work to do.
llvm: using gold linker
+ rm -rf /home/jara/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/module-cache
+ mkdir -p /home/jara/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/module-cache
symlinking the system headers (/usr/include/c++) into the local clang build directory (/home/jara/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/include).
+ ln -s -f /usr/include/c++ /home/jara/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64/include
+ /usr/local/bin/cmake --build /home/jara/swift-source/build/Ninja-DebugAssert/llvm-linux-x86_64 -- -j4 all
ninja: no work to do.
swift: using gold linker
+ rm -rf /home/jara/swift-source/build/Ninja-DebugAssert/swift-linux-x86_64/module-cache
+ mkdir -p /home/jara/swift-source/build/Ninja-DebugAssert/swift-linux-x86_64/module-cache
+ /usr/local/bin/cmake --build /home/jara/swift-source/build/Ninja-DebugAssert/swift-linux-x86_64 -- -j4 all swift-test-stdlib-linux-x86_64
ninja: no work to do.
libdispatch: using gold linker
Skipping reconfiguration of libdispatch
+ pushd /home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64
~/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64 ~/swift-source/swift
+ make
Making all in dispatch
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/dispatch'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/dispatch'
Making all in libpwq
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libpwq'
make all-am
make[2]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libpwq'
make[2]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libpwq'
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libpwq'
Making all in libkqueue
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libkqueue'
make all-am
make[2]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libkqueue'
make[2]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libkqueue'
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/libkqueue'
Making all in man
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/man'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/man'
Making all in os
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/os'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/os'
Making all in private
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/private'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/private'
Making all in src
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/src'
make all-am
make[2]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/src'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/src'
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/src'
Making all in tests
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/tests'
make[1]: Entering directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64'
+ popd
~/swift-source/swift
+ pushd /home/jara/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/tests
~/swift-source/build/Ninja-DebugAssert/libdispatch-linux-x86_64/tests ~/swift-source/swift
+ make build-tests
make: Nothing to be done for `build-tests'.
+ popd
~/swift-source/swift
I have kept environment for building SourceKit on Linux since swift-3.0-PREVIEW-3.
https://github.com/norio-nomura/docker-sourcekit-builder/

make error during building webkitgtk

I use UBuntu 14.04 LTS. I need to build webkitgtk 2.8.3 Here is an example instruction which I have used: linuxfromscratch When I run sudo make -j8 I get following log:
Scanning dependencies of target JavaScriptCore-4-gir
Scanning dependencies of target fake-generated-webkitdom-headers
[ 0%] Scanning dependencies of target WebKit2-fake-api-headers
Scanning dependencies of target translations_1
[ 0%] Generating ../../JavaScriptCore-4.0.typelib
[ 0%] /bin/sh: 1: ../../JavaScriptCore-4.0.gir: Permission denied
Scanning dependencies of target bmalloc
[ 0%] [ 0%] make[2]: *** [JavaScriptCore-4.0.typelib] Error 126
Generating ../../DerivedSources/webkitdom/WebKitDOMCustom.h
make[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore- 4-gir.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....Generating ../../DerivedSources/webkitdom/WebKitDOMDeprecated.h
What might be wrong ?
Edit1 Verbose log:
make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
/usr/bin/cmake -E cmake_progress_report /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/CMakeFiles
[ 0%] [ 0%] make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
cd /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/Source/WebKit2 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/WebKit2 /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/WebKit2/CMakeFiles/WebKit2-forwarding-headers.dir/DependInfo.cmake --color=
make[2]: Entering directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
/usr/bin/cmake -E cmake_progress_report /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/CMakeFiles
[ 0%] Generating ../../JavaScriptCore-4.0.typelib
cd /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && ../../JavaScriptCore-4.0.gir -o /home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
/bin/sh: 1: ../../JavaScriptCore-4.0.gir: Permission denied
Generating ../../DerivedSources/ForwardingHeaders/webkit2gtk/webkit2
make[2]: *** [JavaScriptCore-4.0.typelib] Error 126
make[2]: Leaving directory `/home/user/MyProjects/midori_dependencies/src/webkitgtk-2.8.3/build'
make[1]: *** [Source/JavaScriptCore/CMakeFiles/JavaScriptCore-4-gir.dir/all] Error 2
/usr/bin/*** Waiting for unfinished jobs....
as you see, in Edit1, you (make) try to run JavaScriptCore-4.0.gir instead of compile it with g-ir-compiler; I tried on my pc and my command is:
cd /home/davide/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && \
/usr/bin/g-ir-compiler /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.gir \
-o /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
as a workaround, you cand edit:
build/Source/JavaScriptCore/CMakeFiles/JavascriptCore-4-gir.dir/build
here's the lines on my file (the last line is what you need to change):
JavaScriptCore-4.0.typelib: JavaScriptCore-4.0.gir
$(CMAKE_COMMAND) -E cmake_progress_report /home/davide/src/webkitgtk-2.8.3/build/CMakeFiles $(CMAKE_PROGRESS_1)
#$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating ../../JavaScriptCore-4.0.typelib"
cd /home/davide/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && /usr/bin/g-ir-compiler /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.gir -o /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib
just add /usr/bin/g-ir-compiler or whatever it is located (which g-ir-compiler)
webkitgtk-2.26.2/Source/cmake/OptionsGTK.cmake webkitgtk-2.26.2/Source/cmake/OptionsGTK.cmake
add bellow line
list(APPEND JavaScriptCore_LIBRARIES -latomic)

Error installing GDBM 1.10

First, i did ./configure
Then, i did make install and Terminal show this:
make[2]: Entering directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin/install -c libgdbm.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgdbm.so.4.0.0 /usr/local/lib/libgdbm.so.4.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libgdbm.so.4.0.0': Permission denied
make[2]: * [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make[1]: * [install-am] Error 2
make[1]: Leaving directory `/home/lucas/Área de Trabalho/gdbm-1.10/src'
make: * [install-recursive] Error 1
Any help?
You do not have permissions to write to /usr/local/lib
sudo make install
or become root and run make install

Resources