make[1]: [install-domserver-l] Error 1 (ignored) - docker

I've been trying to install domjudge on a docker container, but when I execute
sudo make install-domserver
I keep getting this error:
/usr/bin/install -c -m 0644 -o -m 0700 -d /home/domjudge/domjudge/domserver/log
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
You may see the full log here:
docker run -it -p 8080:80 a596a9e71faf
domjudge#f31ab58ea764:~/domjudge-5.0.1$ ./configure --prefix=$HOME/domjudge
checking whether configure should try to set CFLAGS... yes
checking whether configure should try to set CXXFLAGS... yes
checking whether configure should try to set LDFLAGS... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -fstack-protector... yes
checking whether C compiler accepts -fPIE... yes
checking whether C compiler accepts -D_FORTIFY_SOURCE=2... yes
checking whether the linker accepts -fPIE... yes
checking whether the linker accepts -pie... yes
checking whether the linker accepts -Wl,-z,relro... yes
checking whether the linker accepts -Wl,-z,now... yes
checking domjudge-user... (default: current user)
checking webserver-group... www-data (detected)
checking runuser... domjudge-run (default)
checking for cgroup_init in -lcgroup... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C++ preprocessor... g++ -E
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating paths.mk
config.status: creating etc/config.h
Summary:
* project.............: DOMjudge 5.0.1
* prefix..............: /home/domjudge/domjudge
* CPPFLAGS............:
* CFLAGS..............: -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2
* CXXFLAGS............: -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2
* LDFLAGS.............: -fPIE -pie -Wl,-z,relro -Wl,-z,now
* default user........:
* runguard user.......: domjudge-run
* webserver group.....: www-data
* use Linux cgroups...: no
* submitclient........: enabled, cURL version: 7.38.0
* documentation.......: /home/domjudge/domjudge/doc
* domserver...........: /home/domjudge/domjudge/domserver
- bin..............: /home/domjudge/domjudge/domserver/bin
- etc..............: /home/domjudge/domjudge/domserver/etc
- lib..............: /home/domjudge/domjudge/domserver/lib
- libext...........: /home/domjudge/domjudge/domserver/lib/ext
- libwww...........: /home/domjudge/domjudge/domserver/lib/www
- libsubmit........: /home/domjudge/domjudge/domserver/lib/submit
- log..............: /home/domjudge/domjudge/domserver/log
- run..............: /home/domjudge/domjudge/domserver/run
- sql..............: /home/domjudge/domjudge/domserver/sql
- submit...........: /home/domjudge/domjudge/domserver/submissions
- tmp..............: /home/domjudge/domjudge/domserver/tmp
- www..............: /home/domjudge/domjudge/domserver/www
* judgehost...........: /home/domjudge/domjudge/judgehost
- bin..............: /home/domjudge/domjudge/judgehost/bin
- etc..............: /home/domjudge/domjudge/judgehost/etc
- lib..............: /home/domjudge/domjudge/judgehost/lib
- libext...........: /home/domjudge/domjudge/judgehost/lib/ext
- libjudge.........: /home/domjudge/domjudge/judgehost/lib/judge
- log..............: /home/domjudge/domjudge/judgehost/log
- run..............: /home/domjudge/domjudge/judgehost/run
- tmp..............: /home/domjudge/domjudge/judgehost/tmp
- judge............: /home/domjudge/domjudge/judgehost/judgings
- chroot...........: /chroot/domjudge
- cgroup...........: /cgroup
Run 'make' without arguments to get a list of (build) targets.
domjudge#f31ab58ea764:~/domjudge-5.0.1$ make domserver
make -C etc config
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
Substituting configure variables in 'apache.conf'.
Substituting configure variables in 'nginx-conf'.
Substituting configure variables in 'domserver-static.php'.
Substituting configure variables in 'judgehost-static.php'.
Substituting configure variables in 'runguard-config.h'.
Substituting configure variables in 'submit-config.h'.
Substituting configure variables in 'sudoers-domjudge'.
Substituting configure variables in 'cgroup-domjudge.conf'.
Substituting configure variables in 'domjudge-judgehost.init'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
Recursing target `domserver' into: etc sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
echo "# Randomly generated on host `hostname`, `date`" > dbpasswords.secret
chmod go= dbpasswords.secret
./gendbpasswords >> dbpasswords.secret
echo "# Randomly generated on host `hostname`, `date`" > restapi.secret
chmod go= restapi.secret
./genrestapicredentials >> restapi.secret
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
Substituting configure variables in 'dj-setup-database'.
chmod a+x dj-setup-database
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
Substituting configure variables in 'configure.php'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
Substituting configure variables in 'balloons'.
chmod a+x balloons
Substituting configure variables in 'create_accounts'.
chmod a+x create_accounts
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[1]: Nothing to be done for 'domserver-l'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
domjudge#f31ab58ea764:~/domjudge-5.0.1$ sudo make install-domserver
make -C etc config
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Nothing to be done for 'config'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
Recursing target `domserver' into: etc sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Nothing to be done for 'domserver'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[1]: Nothing to be done for 'domserver-l'.
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
/usr/bin/install -c -d /home/domjudge/domjudge/domserver/bin /home/domjudge/domjudge/domserver/etc /home/domjudge/domjudge/domserver/www /home/domjudge/domjudge/domserver/lib /home/domjudge/domjudge/domserver/lib/submit /home/domjudge/domjudge/domserver/lib/ext /home/domjudge/domjudge/domserver/lib/www /home/domjudge/domjudge/domserver/log /home/domjudge/domjudge/domserver/run /home/domjudge/domjudge/domserver/tmp /home/domjudge/domjudge/domserver/submissions /home/domjudge/domjudge/domserver/sql/upgrade /home/domjudge/domjudge/domserver/www/images/affiliations /home/domjudge/domjudge/domserver/www/images/countries /home/domjudge/domjudge/domserver/www/images/teams /home/domjudge/domjudge/domserver/www/public /home/domjudge/domjudge/domserver/www/team /home/domjudge/domjudge/domserver/www/jury /home/domjudge/domjudge/domserver/www/api /home/domjudge/domjudge/domserver/www/auth /home/domjudge/domjudge/domserver/www/js /home/domjudge/domjudge/domserver/www/js/flot /home/domjudge/domjudge/domserver/www/js/ace
Recursing target `install-domserver' into: etc lib sql www misc-tools
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/etc'
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/etc \
apache.conf nginx-conf domserver-static.php
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/etc \
gendbpasswords genrestapicredentials
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/etc \
domserver-config.php common-config.php
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/etc'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/lib'
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/lib *.php
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/lib/www www/*.php
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/lib alert
cp -R -t /home/domjudge/domjudge/domserver/lib/ext ext/*
chmod -R a+rX /home/domjudge/domjudge/domserver/lib/ext
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/lib'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/sql'
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/bin dj-setup-database
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql \
mysql_db_structure.sql mysql_db_defaultdata.sql mysql_db_examples.sql \
mysql_db_files_defaultdata.sql mysql_db_files_examples.sql
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/upgrade \
upgrade/upgrade_*.sql upgrade/README
/usr/bin/install -c -d /home/domjudge/domjudge/domserver/sql/files/defaultdata /home/domjudge/domjudge/domserver/sql/files/examples
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/files/defaultdata \
files/defaultdata/*.zip
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/sql/files/examples \
files/examples/*.zip
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/sql'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/www'
for d in . countries ; do \
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/images/$d images/$d/*.png ; \
done
for d in public team jury api auth ; do \
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/$d $d/*.php ; \
done
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/images/teams images/teams/*.jpg
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/jury jury/*.css
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js js/*.js js/*.gif js/*.png
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js/flot js/flot/*.js
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www/js/ace js/ace/*.js
/usr/bin/install -c -m 0644 -t /home/domjudge/domjudge/domserver/www *.php *.css
rm -f /home/domjudge/domjudge/domserver/www/jury/doc
ln -s /home/domjudge/domjudge/doc /home/domjudge/domjudge/domserver/www/jury/doc
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/www'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1/misc-tools'
/usr/bin/install -c -t /home/domjudge/domjudge/domserver/bin balloons create_accounts
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1/misc-tools'
make[1]: Entering directory '/home/domjudge/domjudge-5.0.1'
make check-root
make[2]: Entering directory '/home/domjudge/domjudge-5.0.1'
make[2]: Leaving directory '/home/domjudge/domjudge-5.0.1'
/usr/bin/install -c -m 0644 -o -m 0700 -d /home/domjudge/domjudge/domserver/log
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o -m 0700 -d /home/domjudge/domjudge/domserver/run
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o -g www-data -m 0770 -d /home/domjudge/domjudge/domserver/submissions
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o -g www-data -m 0770 -d /home/domjudge/domjudge/domserver/tmp
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o -m 0600 -t /home/domjudge/domjudge/domserver/etc \
etc/restapi.secret
/usr/bin/install: invalid user '-m'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
/usr/bin/install -c -m 0644 -o -g www-data -m 0640 -t /home/domjudge/domjudge/domserver/etc \
etc/dbpasswords.secret
/usr/bin/install: invalid user '-g'
Makefile:98: recipe for target 'install-domserver-l' failed
make[1]: [install-domserver-l] Error 1 (ignored)
make[1]: Leaving directory '/home/domjudge/domjudge-5.0.1'
domjudge#f31ab58ea764:~/domjudge-5.0.1$

I was missing using the --with-domjudge-user arg in ./configure --prefix=$HOME/domjudge --with-domjudge-user=domjudge .
Thanks again to Etan Reisner for its feedback.

Related

Compiling gcc 12.2.0 on dockerized Centos 7 fail with "execvp: Permission denied"

Due to some constraints, I have to compile the latest version of gcc in a dockerized centos7, here is the testing Dockerfile :
FROM centos:7 as deps
ENV INSTALL_PREFIX /opt/deps
ENV PROC -j4
ENV LD_LIBRARY_PATH $INSTALL_PREFIX/lib:$LD_LIBRARY_PATH
ENV PATH $INSTALL_PREFIX/bin:$PATH
WORKDIR /root
RUN yum -y -q install deltarpm && yum -y -q update && yum -y -q groupinstall 'Development Tools'
COPY packages/common/ .
RUN tar -xzf lzip-1.23.tar.gz && cd lzip-1.23 && ./configure && make $PROC && make install
RUN tar -xzf binutils-2.35.2.tar.gz && cd binutils-2.35.2 && ./configure --prefix=$INSTALL_PREFIX && make $PROC && make install
RUN tar --lzip -xf gmp-6.2.1.tar.lz && cd gmp-6.2.1 && ./configure --prefix=$INSTALL_PREFIX && make $PROC && make install
RUN tar -xzf mpfr-4.2.0.tar.gz && cd mpfr-4.2.0 && ./configure --prefix=$INSTALL_PREFIX --with-gmp=$INSTALL_PREFIX && make $PROC && make install
RUN tar -xzf mpc-1.3.1.tar.gz && cd mpc-1.3.1 && ./configure --prefix=$INSTALL_PREFIX --with-mpfr=$INSTALL_PREFIX --with-gmp=$INSTALL_PREFIX && make $PROC && make install
RUN tar -xzf zstd-1.5.4.tar.gz && cd zstd-1.5.4 && make $PROC && make DESTDIR=$INSTALL_PREFIX install && cp -R $INSTALL_PREFIX/usr/local/* $INSTALL_PREFIX/. && rm -rf $INSTALL_PREFIX/usr
RUN tar -xzf isl-0.25.tar.gz && cd isl-0.25 && ./configure --prefix=$INSTALL_PREFIX --with-gmp-prefix=$INSTALL_PREFIX && make $PROC && make install
RUN tar -xzf gcc-12.2.0.tar.gz && mkdir $INSTALL_PREFIX/../gcc
WORKDIR /tmp/gcc
RUN ~/gcc-12.2.0/configure --prefix=$INSTALL_PREFIX/../gcc --with-ld=$INSTALL_PREFIX/bin --enable-languages=c,c++ --disable-multilib --with-mpfr=$INSTALL_PREFIX --with-gmp=$INSTALL_PREFIX \
--with-mpc=$INSTALL_PREFIX --with-isl=$INSTALL_PREFIX --with-zstd=$INSTALL_PREFIX
RUN make $PROC || true
#RUN make install
ENTRYPOINT ["/bin/bash"]
This is the error I get when I try to compile gcc version 12.2.0 :
[ -f stage_final ] || echo stage3 > stage_final
make[1]: Entering directory `/tmp/gcc'
make[2]: Entering directory `/tmp/gcc'
make[3]: Entering directory `/tmp/gcc'
rm -f stage_current
make[3]: Leaving directory `/tmp/gcc'
make[2]: Leaving directory `/tmp/gcc'
make[2]: Entering directory `/tmp/gcc'
make[3]: Entering directory `/tmp/gcc/libiberty'
make[4]: Entering directory `/tmp/gcc/libiberty/testsuite'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/tmp/gcc/libiberty/testsuite'
make[3]: Leaving directory `/tmp/gcc/libiberty'
make[3]: Entering directory `/tmp/gcc/lto-plugin'
make all-am
make[4]: Entering directory `/tmp/gcc/lto-plugin'
make[4]: Leaving directory `/tmp/gcc/lto-plugin'
make[3]: Leaving directory `/tmp/gcc/lto-plugin'
make[3]: Entering directory `/tmp/gcc/intl'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/gcc/intl'
make[3]: Entering directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libiberty'
make[4]: Entering directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make[3]: Leaving directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libiberty'
make[3]: Entering directory `/tmp/gcc/build-x86_64-pc-linux-gnu/fixincludes'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/gcc/build-x86_64-pc-linux-gnu/fixincludes'
make[3]: Entering directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[3]: Leaving directory `/tmp/gcc/build-x86_64-pc-linux-gnu/libcpp'
make[3]: Entering directory `/tmp/gcc/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc -std=gnu99" "CFLAGS=-g" "CXXFLAGS=-g" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c$make[3]: Leaving directory `/tmp/gcc/zlib'
make[3]: Entering directory `/tmp/gcc/libbacktrace'
make all-am
make[4]: Entering directory `/tmp/gcc/libbacktrace'
true DO=all multi-do # make
make[4]: Leaving directory `/tmp/gcc/libbacktrace'
make[3]: Leaving directory `/tmp/gcc/libbacktrace'
make[3]: Entering directory `/tmp/gcc/libcpp'
make[3]: Leaving directory `/tmp/gcc/libcpp'
make[3]: Entering directory `/tmp/gcc/libcody'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/gcc/libcody'
make[3]: Entering directory `/tmp/gcc/libdecnumber'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/gcc/libdecnumber'
make[3]: Entering directory `/tmp/gcc/gcc'
make[3]: Leaving directory `/tmp/gcc/gcc'
Checking multilib configuration for libgcc...
make[3]: Entering directory `/tmp/gcc/x86_64-pc-linux-gnu/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
# Early copyback; see "all" above for the rationale. The
# early copy is necessary so that the gcc -B options find
# the right startup files when linking shared libgcc.
/bin/sh /root/gcc-12.2.0/libgcc/../mkinstalldirs ../.././gcc
parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"; \
for file in $parts; do \
rm -f ../.././gcc/$file; \
/usr/bin/install -c -m 644 $file ../.././gcc/; \
case $file in \
*.a) \
ranlib ../.././gcc/$file ;; \
esac; \
done
# #multilib_flags# is still needed because this may use
# /tmp/gcc/./gcc/xgcc -B/tmp/gcc/./gcc/ -B/opt/deps/../gcc/x86_64-pc-linux-gnu/bin/ -B/opt/deps/../gcc/x86_64-pc-linux-gnu/lib/ -isystem /opt/deps/../gcc/x86_64-pc-linux-gnu/include -isystem /opt/deps/../gcc/x86_64-pc-linux-gnu/sys-incl$# #multilib_dir# is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh /root/gcc-12.2.0/libgcc/../mkinstalldirs .
/tmp/gcc/./gcc/xgcc -B/tmp/gcc/./gcc/ -B/opt/deps/../gcc/x86_64-pc-linux-gnu/bin/ -B/opt/deps/../gcc/x86_64-pc-linux-gnu/lib/ -isystem /opt/deps/../gcc/x86_64-pc-linux-gnu/include -isystem /opt/deps/../gcc/x86_64-pc-linux-gnu/sys-includ$collect2: fatal error: execvp: Permission denied
compilation terminated.
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/tmp/gcc/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/tmp/gcc'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/gcc'
make: *** [all] Error 2
I get the same kind of error with gcc 10 and 9. I am using docker on windows version 4.16.3(96739).
I fail to understand what is called with execvp, and since I am root, how I am getting Permission denied. I should be able to successfully able to completely compile gcc. How to do ?
67527678, 67090507 do not work (and I am not able to use 67090507)
EDIT : I forgot to precise that chmod or chown do not solve the issue.

Error installing idb iOS pen testing tool on Mac

Fetching libxml-ruby-3.1.0.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.10.gem
Building native extensions. This could take a while...
Successfully installed sqlite3-1.4.2
Building native extensions. This could take a while...
ERROR: Error installing idb:
ERROR: Failed to build gem native extension.
current directory: /Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5
/Users/dhruvbaviskar/.rvm/rubies/ruby-2.4.1/bin/ruby -I /Users/dhruvbaviskar/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0 -r ./siteconf20210417-63256-bumwrc.rb extconf.rb
current directory: /Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5
make DESTDIR\= clean
mkdir ext/build
mkdir bin/2.4
mkdir bin/plugins
mkdir bin/plugins/accessible
mkdir bin/plugins/bearer
mkdir bin/plugins/codecs
mkdir bin/plugins/designer
mkdir bin/plugins/graphicssystems
mkdir bin/plugins/iconengines
mkdir bin/plugins/imageformats
mkdir bin/plugins/phonon_backend
mkdir bin/plugins/qmltooling
mkdir bin/plugins/sqldrivers
mkdir lib/2.4
cd ext/build; rm -rf CMakeFiles
cd ext/build; rm -rf generator
cd ext/build; rm -rf smoke
cd ext/build; rm -rf ruby
cd ext/build; rm *
rm: *: No such file or directory
make: [clean] Error 1 (ignored)
current directory: /Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5
make DESTDIR\=
mkdir ext/build
mkdir: ext/build: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/2.4
mkdir: bin/2.4: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins
mkdir: bin/plugins: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/accessible
mkdir: bin/plugins/accessible: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/bearer
mkdir: bin/plugins/bearer: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/codecs
mkdir: bin/plugins/codecs: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/designer
mkdir: bin/plugins/designer: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/graphicssystems
mkdir: bin/plugins/graphicssystems: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/iconengines
mkdir: bin/plugins/iconengines: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/imageformats
mkdir: bin/plugins/imageformats: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/phonon_backend
mkdir: bin/plugins/phonon_backend: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/qmltooling
mkdir: bin/plugins/qmltooling: File exists
make: [makedirs] Error 1 (ignored)
mkdir bin/plugins/sqldrivers
mkdir: bin/plugins/sqldrivers: File exists
make: [makedirs] Error 1 (ignored)
mkdir lib/2.4
mkdir: lib/2.4: File exists
make: [makedirs] Error 1 (ignored)
cd ext/build; rm -rf CMakeFiles
cd ext/build; rm -rf generator
cd ext/build; rm -rf smoke
cd ext/build; rm -rf ruby
cd ext/build; rm *
rm: *: No such file or directory
make: [clean] Error 1 (ignored)
cd ext/build; \
cmake -DCMAKE_MINIMUM_REQUIRED_VERSION=2.6 \
-G "Unix Makefiles" \
-Wno-dev \
-DRUBY_EXECUTABLE=/Users/dhruvbaviskar/.rvm/rubies/ruby-2.4.1/bin/ruby \
..
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/Cellar/cmake/3.20.1/share/cmake/Modules/FindQt4.cmake:1314 (message):
Found unsuitable Qt version "6.0.3" from /usr/local/bin/qmake, this code
requires Qt 4.x
Call Stack (most recent call first):
generator/CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5/ext/build/CMakeFiles/CMakeOutput.log".
See also "/Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5/ext/build/CMakeFiles/CMakeError.log".
make: [build] Error 1 (ignored)
cd ext/build; make
make[1]: *** No targets specified and no makefile found. Stop.
make: *** [build] Error 2
make failed, exit code 2
Gem files will remain installed in /Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/gems/qtbindings-4.8.6.5 for inspection.
Results logged to /Users/dhruvbaviskar/.rvm/gems/ruby-2.4.1/extensions/x86_64-darwin-20/2.4.0/qtbindings-4.8.6.5/gem_make.out
The important part of the error message is:
Found unsuitable Qt version "6.0.3" from /usr/local/bin/qmake, this code requires Qt 4.x
You appear to have QT 6.0.3 installed (potentially via Homebrew). The qtbindings gem you are trying to install there (likely as a transient dependency) requires QT 4 however.
With homebrew, you could install it with
brew tap cartr/qt4
brew install qt#4

how to install glib2 package in docker

I use docker to install centos 6.5 and opensource c++ mysql proxy : DBPORXY(https://github.com/Meituan-Dianping/DBProxy.git), when I run into the last command, I failed.From the error info, I think that is glib2 problem,but I have installed glib2! that is my public docker : [
docker pull xujianhai/dbproxy], the method I use to implement glib2 :
cd glib-2.42.0
./configure
make
make install
vi /etc/ld.so.conf
add a row and exit: /usr/local/lib
ldconfig
the detail error message when I run into the last command :
bash-4.1# make
make all-recursive
make[1]: Entering directory `/DBProxy'
Making all in src
make[2]: Entering directory `/DBProxy/src'
make all-am
make[3]: Entering directory `/DBProxy/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/mysql -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -ggdb -g -O0 -MT libmysql_chassis_glibext_la-glib-ext.lo -MD -MP -MF .deps/libmysql_chassis_glibext_la-glib-ext.Tpo -c -o libmysql_chassis_glibext_la-glib-ext.lo `test -f 'glib-ext.c' || echo './'`glib-ext.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/mysql -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -ggdb -g -O0 -MT libmysql_chassis_glibext_la-glib-ext.lo -MD -MP -MF .deps/libmysql_chassis_glibext_la-glib-ext.Tpo -c glib-ext.c -fPIC -DPIC -o .libs/libmysql_chassis_glibext_la-glib-ext.o
glib-ext.c: In function 'g_string_get_time':
glib-ext.c:121: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'm'
glib-ext.c:121: error: 'm' undeclared (first use in this function)
glib-ext.c:121: error: (Each undeclared identifier is reported only once
glib-ext.c:121: error: for each function it appears in.)
make[3]: *** [libmysql_chassis_glibext_la-glib-ext.lo] Error 1
make[3]: Leaving directory `/DBProxy/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/DBProxy/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/DBProxy'
make: *** [all] Error 2

configure script in xcode fails with exit code 1

I'm running this script as an Xcode run script to build graphviz:
if [ ! "${BUILT_PRODUCTS_DIR}/graphviz/Makefile" -nt "${SRCROOT}/graphviz/configure" ]
then
GVROOT="${SRCROOT}/graphviz"
# figure out optimization
OPT="${GCC_OPTIMIZATION_LEVEL}"
if [ -z "${OPT}" ]
then
OPT="s"
fi
FLAGS="-fexceptions -gdwarf-2 -isysroot ${SDKROOT} -miphoneos-version-min=${IPHONEOS_DEPLOYMENT_TARGET} -mthumb -O${OPT}"
# figure out architecture
for ARCH in ${ARCHS}
do
FLAGS="${FLAGS} -arch ${ARCH}"
done
# figure out preprocessor defines
for DEFINITION in ${GCC_PREPROCESSOR_DEFINITIONS}
do
FLAGS="${FLAGS} -D${DEFINITION}"
done
mkdir -p ${BUILT_PRODUCTS_DIR}/graphviz
cd ${BUILT_PRODUCTSx_DIR}/graphviz
${GVROOT}/configure \
--build=${NATIVE_ARCH_ACTUAL}-apple-darwin11 \
--host=${NATIVE_ARCH}-apple-darwin11 \
--disable-dependency-tracking \
--enable-shared=no \
--enable-static=yes \
--enable-ltdl=no \
--enable-swig=no \
--enable-tcl=no \
--srcdir=${GVROOT} \
--with-codegens=no \
--with-graph=yes \
--with-expat=no \
--with-fontconfig=no \
--with-freetype2=no \
--with-ipsepcola=yes \
--with-libgd=no \
--with-quartz=yes \
--with-visio=yes \
--with-x=no \
CC="${PLATFORM_DEVELOPER_BIN_DIR}/clang" \
CPP="${PLATFORM_DEVELOPER_BIN_DIR}/clang -E" \
CXX="${PLATFORM_DEVELOPER_BIN_DIR}/clang++" \
OBJC="${PLATFORM_DEVELOPER_BIN_DIR}/clang" \
LD="${PLATFORM_DEVELOPER_BIN_DIR}/ld" \
CFLAGS="${FLAGS}" \
CXXFLAGS="${FLAGS} -fvisibility-inlines-hidden" \
OBJCFLAGS="${FLAGS}" 2>/dev/null
fi
I get the following compiler output:
checking build system type... x86_64-apple-darwin11
checking host system type... i386-apple-darwin11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin11-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /Users/michaelciccotti/Documents/Projects/Tests/LowGraphvix/graphviz/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
Command /bin/sh failed with exit code 1
How do I figure out what is going wrong?
I figured out what was going wrong by running Xcode as root. This gave me more verbose failure messages (not sure why). My problem was that I needed to 'make distclean' because I had a previous build in the directory.

issue in installing Sphinx on mac

Compiling the code using :-
LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local --with-mysql=/usr/local/mysql-5.5.9-osx10.6-x86_64
O/p for the compilation.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libstemmer_c/Makefile
config.status: creating sphinx.conf.dist
config.status: creating sphinx-min.conf.dist
config.status: creating config/config.h
config.status: executing depfiles commands
configuration done
------------------
You can now run 'make' to build Sphinx binaries,
and then run 'make install' to install them.
O/p for make:--
g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql-5.5.9-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64 -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT tests.o -MD -MP -MF .deps/tests.Tpo -c -o tests.o tests.cpp
mv -f .deps/tests.Tpo .deps/tests.Po
g++ -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -arch x86_64 -o tests tests.o libsphinx.a -L/usr/local/mysql-5.5.9-osx10.6-x86_64/lib -lmysqlclient -lpthread -lodbc -lz -lexpat -L/usr/local/lib -lpthread
Making all in test
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all-am'.
O/p for make install:--
Making install in src
if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
make install-am
test -z "/usr/local/bin" || ../config/install-sh -c -d "/usr/local/bin"
/usr/bin/install -c 'indexer' '/usr/local/bin/indexer'
/usr/bin/install -c 'searchd' '/usr/local/bin/searchd'
/usr/bin/install -c 'search' '/usr/local/bin/search'
/usr/bin/install -c 'spelldump' '/usr/local/bin/spelldump'
/usr/bin/install -c 'indextool' '/usr/local/bin/indextool'
make[3]: Nothing to be done for `install-data-am'.
Making install in test
make[1]: Nothing to be done for `install'.
test -z "/usr/local/etc" || config/install-sh -c -d "/usr/local/etc"
/usr/bin/install -c -m 644 'sphinx.conf.dist' '/usr/local/etc/sphinx.conf.dist'
/usr/bin/install -c -m 644 'sphinx-min.conf.dist' '/usr/local/etc/sphinx-min.conf.dist'
/usr/bin/install -c -m 644 'example.sql' '/usr/local/etc/example.sql'
make install-data-hook
mkdir -p /usr/local/var/data && mkdir -p /usr/local/var/log
If I try to run thinking sphinx server:-
rake thinking_sphinx:index
(in /Users/mohit/projects/urbanAdda)
sh: line 1: 26356 Trace/BPT trap indexer 2>&1
sh: line 1: 26359 Trace/BPT trap indexer 2>&1
Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name
For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html
sh: line 1: 26361 Trace/BPT trap indexer 2>&1
Generating Configuration to /Users/mohit/projects/urbanAdda/config/development.sphinx.conf
dyld: Library not loaded: libmysqlclient.16.dylib
Referenced from: /usr/local/bin/indexer
Reason: image not found
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/indexer
and
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/searchd
solved my problem
The dynamic linker cannot find the mysqlclient library.
Try to add the path where it's installed to the DYLD_LIBRARY_PATH environment variable.
And when/if you plan to rebuild it, add "-Wl,-rpath /path/to/lib" to LDFLAGS.

Resources