sugarchain-project / yumekawa

[TEST] Yumekawa 2.0 Taproot
MIT License
6 stars 5 forks source link

gitian: yespower on Windows #39

Closed decryp2kanon closed 3 years ago

decryp2kanon commented 3 years ago
  CXXLD    libbitcoinconsensus.la
  AR       libbitcoin_server.a
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_lock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:748: undefined reference to `__imp_pthread_mutex_lock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `LogPrintf<char const*, char const*>':
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:168: undefined reference to `LogInstance()'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `LogPrintf<char const*, char const*>':
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `LogInstance()'
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `BCLog::Logger::LogPrintStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:168: undefined reference to `LogInstance()'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `LogPrintf<char const*, char const*>':
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `LogInstance()'
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `BCLog::Logger::LogPrintStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `LogPrintf<>':
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:168: undefined reference to `LogInstance()'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_lock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:748: undefined reference to `__imp_pthread_mutex_lock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `LogPrintf<>':
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `LogInstance()'
/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src/./logging.h:176: undefined reference to `BCLog::Logger::LogPrintStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
Makefile:7428: recipe for target 'libbitcoinconsensus.la' failed
make[2]: *** [libbitcoinconsensus.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src'
Makefile:18534: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src'
Makefile:798: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
decryp2kanon commented 3 years ago

try remove Logprintf in src/block.cpp

decryp2kanon commented 3 years ago
  AR       crc32c/libcrc32c.a
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_lock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:748: undefined reference to `__imp_pthread_mutex_lock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
Makefile:7428: recipe for target 'libbitcoinconsensus.la' failed
decryp2kanon commented 3 years ago

$ ./gitian-build.py -j 14 -m 10000 --os wm --detach-sign --no-commit -b decryp2kanon 0.20.99-rc16

Running build script (log in var/build.log)
Traceback (most recent call last):
    6: from bin/gbuild:332:in `<main>'
    5: from bin/gbuild:332:in `each'
    4: from bin/gbuild:334:in `block in <main>'
    3: from bin/gbuild:334:in `each'
    2: from bin/gbuild:339:in `block (2 levels) in <main>'
    1: from bin/gbuild:185:in `build_one_configuration'
bin/gbuild:23:in `system!': failed to run on-target setarch x86_64 bash -x < var/build-script > var/build.log 2>&1 (RuntimeError)
Traceback (most recent call last):
  File "./gitian-build.py", line 262, in <module>
    main()
  File "./gitian-build.py", line 250, in main
    build()
  File "./gitian-build.py", line 69, in build
    subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'sugarchain='+args.commit, '--url', 'sugarchain='+args.url, '../sugarchain/contrib/gitian-descriptors/gitian-win.yml'])
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bin/gbuild', '-j', '14', '-m', '10000', '--commit', 'sugarchain=v0.20.99-rc16', '--url', 'sugarchain=https://github.com/sugarchain-project/yumekawa', '../sugarchain/contrib/gitian-descriptors/gitian-win.yml']' returned non-zero exit status 1.
-script 
#!/bin/bash
set -e
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
umask 002
export OUTDIR=$HOME/out
GBUILD_BITS=64
GBUILD_CACHE_ENABLED=1
GBUILD_PACKAGE_CACHE=$HOME/cache/sugarchain-core-win-0.21
GBUILD_COMMON_CACHE=$HOME/cache/common
MAKEOPTS=(-j14)

(cd build/sugarchain && git reset -q --hard && git clean -q -f -d)

REFERENCE_DATETIME='2020-10-17 17:59:53'
REFERENCE_DATE='2020-10-17'
REFERENCE_TIME='17:59:53'

cd build
set -e -o pipefail

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
YESPOWER_PATH="/home/ubuntu/build/sugarchain/src/crypto/yespower-1.0.1"
YESPOWER_OPTION="-fPIE -Wall -O2 -fomit-frame-pointer"
HOST_CFLAGS="-O2 -g -fno-ident -I${YESPOWER_PATH} ${YESPOWER_OPTION}"
HOST_CXXFLAGS="-O2 -g -fno-ident"

export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC"
export BUILD_DIR="$PWD"
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
  export SOURCES_PATH=${GBUILD_COMMON_CACHE}
  export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
  mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
fi

# Use $LIB in LD_PRELOAD to avoid hardcoding the dir (See `man ld.so`)
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
  echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
  echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
  echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
  echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
  echo "\$REAL \$@" >> $WRAP_DIR/${prog}
  chmod +x ${WRAP_DIR}/${prog}
done
}

function create_per-host_faketime_wrappers {
for i in $HOSTS; do
  for prog in ${FAKETIME_HOST_PROGS}; do
      echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
      echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
      echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
      echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
      echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
      chmod +x ${WRAP_DIR}/${i}-${prog}
  done
done
}

function create_per-host_compiler_wrapper {
# -posix variant is required for c++11 threading.
for i in $HOSTS; do
  for prog in gcc g++; do
      echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
      echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
      echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
      echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
      echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
      chmod +x ${WRAP_DIR}/${i}-${prog}
  done
done
}

# Faketime for depends so intermediate results are comparable
export PATH_orig=${PATH}
create_global_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_compiler_wrapper "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}

cd sugarchain
BASEPREFIX="${PWD}/depends"
# Build dependencies for each host
for i in $HOSTS; do
  make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done

# Faketime for binaries
export PATH=${PATH_orig}
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
create_per-host_compiler_wrapper "${REFERENCE_DATETIME}"
export PATH=${WRAP_DIR}:${PATH}

# Define DISTNAME variable.
# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME
source contrib/gitian-descriptors/assign_DISTNAME

GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz"

# Create the source tarball
mkdir -p "$(dirname "$GIT_ARCHIVE")"
git archive --output="$GIT_ARCHIVE" HEAD

ORIGPATH="$PATH"
# Extract the git archive into a dir for each host and build
for i in ${HOSTS}; do
  export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
  mkdir -p distsrc-${i}
  cd distsrc-${i}
  INSTALLPATH="${PWD}/installed/${DISTNAME}"
  mkdir -p ${INSTALLPATH}
  tar -xf $GIT_ARCHIVE

  ./autogen.sh
  CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"
  make ${MAKEOPTS}
  make ${MAKEOPTS} -C src check-security
  make ${MAKEOPTS} -C src check-symbols
  make deploy BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
  make install DESTDIR=${INSTALLPATH}
  cd installed
  mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
  find . -name "lib*.la" -delete
  find . -name "lib*.a" -delete
  rm -rf ${DISTNAME}/lib/pkgconfig
  find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
  find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
  cp ../doc/README_windows.txt ${DISTNAME}/readme.txt
  find ${DISTNAME} -not -name "*.dbg"  -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i//x86_64-w64-mingw32/win64}.zip
  find ${DISTNAME} -name "*.dbg"  -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i//x86_64-w64-mingw32/win64}-debug.zip
  cd ../../
  rm -rf distsrc-${i}
done

cp -rf contrib/windeploy $BUILD_DIR
cd $BUILD_DIR/windeploy
mkdir unsigned
cp ${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe unsigned/
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
  CXXLD    libbitcoinconsensus.la
  AR       libbitcoin_server.a
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_lock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:748: undefined reference to `__imp_pthread_mutex_lock'
primitives/.libs/libbitcoinconsensus_la-block.o: In function `__gthread_mutex_unlock':
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/include/c++/x86_64-w64-mingw32/bits/gthr-default.h:778: undefined reference to `__imp_pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
Makefile:7428: recipe for target 'libbitcoinconsensus.la' failed
make[2]: *** [libbitcoinconsensus.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src'
Makefile:18534: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/src'
Makefile:798: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
decryp2kanon commented 3 years ago

try add "--disable-shared"

decryp2kanon commented 3 years ago
#!/bin/bash
set -e
export LANG='en_US.UTF-8'
export LC_ALL='en_US.UTF-8'
umask 002
export OUTDIR=$HOME/out
GBUILD_BITS=64
GBUILD_CACHE_ENABLED=1
GBUILD_PACKAGE_CACHE=$HOME/cache/sugarchain-core-win-0.21
GBUILD_COMMON_CACHE=$HOME/cache/common
MAKEOPTS=(-j14)

(cd build/sugarchain && git reset -q --hard && git clean -q -f -d)

REFERENCE_DATETIME='2020-10-17 18:45:23'
REFERENCE_DATE='2020-10-17'
REFERENCE_TIME='18:45:23'

cd build
set -e -o pipefail

WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests"
FAKETIME_HOST_PROGS="ar ranlib nm windres strip objcopy"
FAKETIME_PROGS="date makensis zip"
YESPOWER_PATH="/home/ubuntu/build/sugarchain/src/crypto/yespower-1.0.1"
YESPOWER_OPTION="-fPIE -Wall -O2 -fomit-frame-pointer"
HOST_CFLAGS="-O2 -g -fno-ident -I${YESPOWER_PATH} ${YESPOWER_OPTION}"
HOST_CXXFLAGS="-O2 -g -fno-ident"

export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC"
export BUILD_DIR="$PWD"
mkdir -p ${WRAP_DIR}
if test -n "$GBUILD_CACHE_ENABLED"; then
  export SOURCES_PATH=${GBUILD_COMMON_CACHE}
  export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
  mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
fi

# Use $LIB in LD_PRELOAD to avoid hardcoding the dir (See `man ld.so`)
function create_global_faketime_wrappers {
for prog in ${FAKETIME_PROGS}; do
  echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog}
  echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
  echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${prog}
  echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog}
  echo "\$REAL \$@" >> $WRAP_DIR/${prog}
  chmod +x ${WRAP_DIR}/${prog}
done
}

function create_per-host_faketime_wrappers {
for i in $HOSTS; do
  for prog in ${FAKETIME_HOST_PROGS}; do
      echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
      echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
      echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
      echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
      echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
      chmod +x ${WRAP_DIR}/${i}-${prog}
  done
done
}

function create_per-host_compiler_wrapper {
# -posix variant is required for c++11 threading.
for i in $HOSTS; do
  for prog in gcc g++; do
      echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
      echo "REAL=\`which -a ${i}-${prog}-posix | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
      echo "export LD_PRELOAD='/usr/\$LIB/faketime/libfaketime.so.1'" >> ${WRAP_DIR}/${i}-${prog}
      echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
      echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
      chmod +x ${WRAP_DIR}/${i}-${prog}
  done
done
}

# Faketime for depends so intermediate results are comparable
export PATH_orig=${PATH}
create_global_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_faketime_wrappers "2000-01-01 12:00:00"
create_per-host_compiler_wrapper "2000-01-01 12:00:00"
export PATH=${WRAP_DIR}:${PATH}

cd sugarchain
BASEPREFIX="${PWD}/depends"
# Build dependencies for each host
for i in $HOSTS; do
  make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done

# Faketime for binaries
export PATH=${PATH_orig}
create_global_faketime_wrappers "${REFERENCE_DATETIME}"
create_per-host_faketime_wrappers "${REFERENCE_DATETIME}"
create_per-host_compiler_wrapper "${REFERENCE_DATETIME}"
export PATH=${WRAP_DIR}:${PATH}

# Define DISTNAME variable.
# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME
source contrib/gitian-descriptors/assign_DISTNAME

GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz"

# Create the source tarball
mkdir -p "$(dirname "$GIT_ARCHIVE")"
git archive --output="$GIT_ARCHIVE" HEAD

ORIGPATH="$PATH"
# Extract the git archive into a dir for each host and build
for i in ${HOSTS}; do
  export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
  mkdir -p distsrc-${i}
  cd distsrc-${i}
  INSTALLPATH="${PWD}/installed/${DISTNAME}"
  mkdir -p ${INSTALLPATH}
  tar -xf $GIT_ARCHIVE

  ./autogen.sh
  YESPOWER_WIN_OPTION="--disable-shared" # TODO.ZENY.POW # Build is failing without this flag...
  CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" ${YESPOWER_WIN_OPTION} CXXFLAGS="${HOST_CXXFLAGS}"
  make ${MAKEOPTS}
  make ${MAKEOPTS} -C src check-security
  make ${MAKEOPTS} -C src check-symbols
  make deploy BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe"
  make install DESTDIR=${INSTALLPATH}
  cd installed
  mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
  find . -name "lib*.la" -delete
  find . -name "lib*.a" -delete
  rm -rf ${DISTNAME}/lib/pkgconfig
  find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
  find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
  cp ../doc/README_windows.txt ${DISTNAME}/readme.txt
  find ${DISTNAME} -not -name "*.dbg"  -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i//x86_64-w64-mingw32/win64}.zip
  find ${DISTNAME} -name "*.dbg"  -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i//x86_64-w64-mingw32/win64}-debug.zip
  cd ../../
  rm -rf distsrc-${i}
done

cp -rf contrib/windeploy $BUILD_DIR
cd $BUILD_DIR/windeploy
mkdir unsigned
cp ${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe unsigned/
find . | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz
make[2]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/installed/sugarchain-0.20.99-rc17_yespower//lib/pkgconfig'
 /usr/bin/install -c -m 644 libbitcoinconsensus.pc '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32/installed/sugarchain-0.20.99-rc17_yespower//lib/pkgconfig'
make[2]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32'
make[1]: Leaving directory '/home/ubuntu/build/sugarchain/distsrc-x86_64-w64-mingw32'
+ cd installed
+ mv 'sugarchain-0.20.99-rc17_yespower/bin/*.dll' sugarchain-0.20.99-rc17_yespower/lib/
mv: cannot stat 'sugarchain-0.20.99-rc17_yespower/bin/*.dll': No such file or directory
decryp2kanon commented 3 years ago

try remove mv dll

+    # BEGIN - DISABLE SHARED
+    # WIN_BITCOIN_CONFIG="--disable-shared"
+    # mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
+    if [ -f ${DISTNAME}/bin/*.dll ]; then
+      mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
+    fi
+    # END - DISABLE SHARED
decryp2kanon commented 3 years ago

fixed https://github.com/sugarchain-project/yumekawa/commit/c30fc827b77d56765d018404f1db254b84aae4af