some ideas?

This commit is contained in:
Matt McWilliams 2022-11-09 23:49:14 -05:00
parent b9269d13a0
commit 2177ad55c3
4 changed files with 14 additions and 3 deletions

View File

@ -8,6 +8,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y bash \
libjpeg-dev \
libtiff-dev \
libopenexr-dev \
zlib1g-dev \
autoconf \
automake \
make
@ -22,7 +23,7 @@ RUN cd /opt/boost && ./b2 -j4 toolset=emscripten \
cxxflags="-s USE_PTHREADS=1" \
--prefix=/opt/libboost \
--build-dir=/opt/libboost_build \
link=static \
link=static,shared \
variant=release \
threading=single \
runtime-link=static
@ -35,6 +36,9 @@ RUN emar q libboost_filesystem.a libboost_filesystem.bc
RUN emar q libboost_system.a libboost_system.bc
RUN emar q libboost_thread.a libboost_thread.bc
#RUN embuilder.py build USER
WORKDIR /usr/src/
ENV POVRAY_VERSION=3.7-stable

View File

@ -1,11 +1,14 @@
#!/bin/bash -x
#ls /emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/
#exit
EMAIL="hi@mmcwilliams.com"
NAME="Matt McWilliams"
BOOST_ROOT="/opt/boost/stage/lib/"
BOOST_ROOT="/opt/boost/stage/lib"
CFLAGS="-pthread -DBOOST_THREAD_USE_LIB -s USE_BOOST_HEADERS=1 -s EXIT_RUNTIME=1 -s PTHREAD_POOL_SIZE=4"
CFLAGS="-pthread -DBOOST_THREAD_USE_LIB -s USE_BOOST_HEADERS=1 -s EXIT_RUNTIME=1 -s PTHREAD_POOL_SIZE=4 -I/opt/boost"
LDFLAGS="$CFLAGS -s INITIAL_MEMORY=33554432" # 33554432 bytes = 32 MB
CONFIG_ARGS=(
--arch=x86_32 # use x86_32 to achieve minimal architectural optimization
@ -44,6 +47,8 @@ cd unix/
./prebuild.sh
cd ../
cp ./configure_mod ./configure
BOOST_ROOT=$BOOST_ROOT ./configure "${ARGS[@]}"
#emmake make -j CPPFLAGS="${CPPFLAGS}"

View File

@ -7837,6 +7837,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
echo "HERE $as_as_Lib"
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_THREAD_LIB="-l$ax_lib"; link_thread="yes"; break
else

View File

@ -2,5 +2,6 @@
sudo docker run \
-v $PWD/compile_povray_wasm.sh:/usr/src/povray/compile_povray_wasm.sh \
-v $PWD/configure_mod:/usr/src/povray/configure_mod \
povray_wasm \
sh -c 'bash compile_povray_wasm.sh'