Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STP_STUB option leads to build failure #595

Open
Vekhir opened this issue Aug 11, 2023 · 4 comments
Open

STP_STUB option leads to build failure #595

Vekhir opened this issue Aug 11, 2023 · 4 comments

Comments

@Vekhir
Copy link
Contributor

Vekhir commented Aug 11, 2023

Issue

When using the build option STP_STUB=1 during building in order to disable STP, BSC fails to build with error

/build/bluespec-git/src/bsc/inst/bin/bsc -stdlib-names -bdir /build/bluespec-git/src/bsc/build/bsvlib -p . -vsearch /build/bluespec-git/src/bsc/build/bsvlib -no-use-prelude Prelude.bs
/build/bluespec-git/src/bsc/inst/bin/core/bsc: error while loading shared libraries: libstp_stub.so: cannot open shared object file: No such file or directory

Apparently, bsc is looking for libstp_stub.so, eventhough it should search for libstp.so.1, which does exist in bsc/inst/lib/SAT/.

More information

Error occurs on the main branch (commit 42fb7b6). Omitting the build option builds just fine. Also tried to build with (the randomly chosen) commit a7f3b2c, but failed with the same error.

Command: make STP_STUB=1 GHC="ghc -dynamic" GHCJOBS=4 GHCRTSFLAGS='+RTS -M5G -A128m -RTS' install-src

System information

OS: Arch Linux
Kernel: 6.4.9-arch1-1
GHC: 9.0.2-3
BSC: 42fb7b6 and a7f3b2c (via bluespec-git)

Full error log
make  -C src  PREFIX=/build/bluespec-git/src/bsc/inst  install
make[1]: Entering directory '/build/bluespec-git/src/bsc/src'
make  -C vendor/stp   PREFIX=/build/bluespec-git/src/bsc/inst  install
make[2]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/stp'
make -C src_stub install
make[3]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/stp/src_stub'
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -c -o stp_stub.o stp_stub.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -shared -Wl,-soname,libstp_stub.so -o libstp_stub.so stp_stub.o
mkdir -p ../lib
cp libstp_stub.so ../lib/
ln -fsn libstp.so.1 ../lib/libstp.so
ln -fsn libstp_stub.so ../lib/libstp.so.1
mkdir -p ../include
cp stp_c_interface.h ../include/
make[3]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/stp/src_stub'
ln -fsn HaskellIfc include_hs
install -m 755 -d /build/bluespec-git/src/bsc/inst/lib/SAT
install -m 644 lib/libstp.so.1 /build/bluespec-git/src/bsc/inst/lib/SAT
make[2]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/stp'
make  -C vendor/yices PREFIX=/build/bluespec-git/src/bsc/inst  install
make[2]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/yices'
make -C v2.6 install
make[3]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6'
(cd yices2 ; \
	autoconf ; \
	 ./configure --prefix=/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2-inst ; \
	make ; \
	make install \
	)
configure.ac:79: warning: The macro `AC_PROG_CC_C99' is obsolete.
configure.ac:79: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
configure.ac:79: the top level
configure.ac:909: warning: AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS
checking build system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld... ld
checking for ar... ar
checking for strip... strip
checking for gperf... gperf
checking gperf version... 3.1
checking whether gcc accepts option -fno-stack-protector... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
configure: Trying to find a usable libgmp.a
configure: Searching in  /usr/x86_64-pc-linux-gnu/lib64 /usr/lib /usr/local/lib /usr/x86_64-pc-linux-gnu/lib /usr/local/lib /usr/lib /lib
checking for libgmp.a in /usr/x86_64-pc-linux-gnu/lib64... no
checking for libgmp.a in /usr/lib... no
checking for libgmp.a in /usr/local/lib... no
checking for libgmp.a in /usr/x86_64-pc-linux-gnu/lib... no
checking for libgmp.a in /usr/local/lib... no
checking for libgmp.a in /usr/lib... no
checking for libgmp.a in /lib... no
configure: WARNING: *** No usable libgmp.a library was found ***
checking for main in -lm... yes
checking for __gmpz_cmp in -lgmp... yes
configure: creating ./config.status
config.status: creating make.include
configure: Moving make.include to configs/make.include.x86_64-pc-linux-gnu
make[4]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2'
Mode:     release
Platform: x86_64-pc-linux-gnu
make[5]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2'
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mt
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/io
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/terms
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/utils
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/floyd_warshall
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/funs
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/bv
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/egraph
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/cdcl
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/simplex
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/solvers/quant
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/parser_utils
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/model
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/scratch
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/api
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/frontend
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/frontend/common
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/frontend/smt1
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/frontend/yices
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/frontend/smt2
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/context
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/exists_forall
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/eq
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/uf
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/bool
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/ite
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/nra
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/bv
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/bv/explain
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/obj/mcsat/utils
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/lib
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/bin
./utils/make_source_version ./src/api/yices_version_template.txt src/api/yices_release_version.c 2.6.4 release x86_64-pc-linux-gnu
/usr/bin/mkdir -p build/x86_64-pc-linux-gnu-release/dist
=== Preparing binary distribution ===
make[6]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2/src'

[Building yices2 successfully...]

make[5]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2'
make[4]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2'
ln -fsn /build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2-inst/include
ln -fsn /build/bluespec-git/src/bsc/src/vendor/yices/v2.6/yices2-inst/lib
ln -fsn HaskellIfc include_hs
make[3]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/yices/v2.6'
ln -fsn v2.6/include
ln -fsn v2.6/lib
ln -fsn v2.6/include_hs
install -m 755 -d /build/bluespec-git/src/bsc/inst/lib/SAT
install -m 644 lib/libyices.so.2.6 /build/bluespec-git/src/bsc/inst/lib/SAT
make[2]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/yices'
make  -C vendor/htcl  PREFIX=/build/bluespec-git/src/bsc/inst  install
make[2]: Entering directory '/build/bluespec-git/src/bsc/src/vendor/htcl'
Using tclsh: /usr/bin/tclsh
Using tcl include flags: 
Using tcl library flags: -ltcl8.6 -ltclstub8.6
ghc -dynamic -Wall  -c haskell.c
ar -r libhtcl.a haskell.o
ar: creating libhtcl.a
make[2]: Leaving directory '/build/bluespec-git/src/bsc/src/vendor/htcl'
# we need to build targets from here sequentially, as they operate in the same workspace
make  -C comp -j1   PREFIX=/build/bluespec-git/src/bsc/inst  install
make[2]: Entering directory '/build/bluespec-git/src/bsc/src/comp'
Using tclsh: /usr/bin/tclsh
Using tcl include flags: 
Using tcl library flags: -ltcl8.6 -ltclstub8.6
Building with GHC 9.0.2
----- Normal build options -----
./update-build-version.sh
./update-build-system.sh
bsc start Fri Aug 11 16:40:44 CEST 2023
./update-build-version.sh
BuildVersion.hs up-to-date
./update-build-system.sh
BuildSystem.hs up-to-date
ghc -dynamic -hidir /build/bluespec-git/src/bsc/src/comp/../../build/comp -odir /build/bluespec-git/src/bsc/src/comp/../../build/comp -stubdir /build/bluespec-git/src/bsc/src/comp/../../build/comp -main-is Main_bsc \
	-O2 -hide-all-packages -fasm -Wall -fno-warn-orphans -fno-warn-name-shadowing -fno-warn-unused-matches -package base -package containers -package array -package mtl -package unix -package regex-compat -package bytestring -package directory -package process -package filepath -package time -package old-time -package old-locale -package split -package syb -package integer-gmp  -iGHC -iGHC/posix -iLibs -i../Parsec -i../vendor/stp/include_hs -i../vendor/yices/include_hs -i../vendor/htcl '-tmpdir /tmp'  -I../vendor/stp/include -I../vendor/yices/include -L../vendor/htcl   -lpthread --make bsc -j4 +RTS -M5G -A128m -RTS "-with-rtsopts=-H256m -K10m -i1" -rtsopts -L../vendor/stp/lib -lstp -L../vendor/yices/lib -lyices 
[  1 of 227] Compiling BDD              ( BDD.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BDD.o )
[  2 of 227] Compiling Bag              ( Bag.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Bag.o )
[  3 of 227] Compiling BinaryIO         ( GHC/BinaryIO.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BinaryIO.o )
[  4 of 227] Compiling BuildSystem      ( BuildSystem.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BuildSystem.o )
[  5 of 227] Compiling BuildVersion     ( BuildVersion.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BuildVersion.o )
[  6 of 227] Compiling EquivalenceClass ( EquivalenceClass.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/EquivalenceClass.o )
[  7 of 227] Compiling ErrorTCompat     ( ErrorTCompat.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ErrorTCompat.o )
[  8 of 227] Compiling Exceptions       ( Exceptions.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Exceptions.o )
[  9 of 227] Compiling Fixity           ( Fixity.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Fixity.o )
[ 10 of 227] Compiling GraphPaths       ( GraphPaths.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GraphPaths.o )
[ 11 of 227] Compiling IOMutVar         ( Libs/IOMutVar.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IOMutVar.o )
[ 12 of 227] Compiling Classic          ( Classic.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Classic.o )
[ 13 of 227] Compiling IOUtil           ( Libs/IOUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IOUtil.o )
[ 14 of 227] Compiling ListMap          ( Libs/ListMap.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ListMap.o )
[ 15 of 227] Compiling ListUtil         ( Libs/ListUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ListUtil.o )
[ 16 of 227] Compiling Log2             ( Log2.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Log2.o )
[ 17 of 227] Compiling Parse            ( Libs/Parse.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parse.o )
[ 18 of 227] Compiling RealUtil         ( RealUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/RealUtil.o )
[ 19 of 227] Compiling SEMonad          ( SEMonad.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SEMonad.o )
[ 20 of 227] Compiling STPFFI           ( ../vendor/stp/include_hs/STPFFI.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/STPFFI.o )
[ 21 of 227] Compiling Sort             ( Libs/Sort.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Sort.o )
[ 22 of 227] Compiling SystemVerilogKeywords ( SystemVerilogKeywords.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemVerilogKeywords.o )
[ 23 of 227] Compiling TmpNam           ( GHC/posix/TmpNam.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TmpNam.o )
[ 24 of 227] Compiling Version          ( Version.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Version.o )
[ 25 of 227] Compiling ErrorUtil        ( ErrorUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ErrorUtil.o )
[ 26 of 227] Compiling Util             ( Util.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Util.o )
[ 27 of 227] Compiling FileNameUtil     ( FileNameUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/FileNameUtil.o )
[ 28 of 227] Compiling SpeedyString     ( SpeedyString.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SpeedyString.o )
[ 29 of 227] Compiling IntegerUtil      ( IntegerUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IntegerUtil.o )
[ 30 of 227] Compiling GHCPretty        ( GHCPretty.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GHCPretty.o )
[ 31 of 227] Compiling Pretty           ( Pretty.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Pretty.o )
[ 32 of 227] Compiling PPrint           ( PPrint.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PPrint.o )
[ 33 of 227] Compiling PVPrint          ( PVPrint.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PVPrint.o )
[ 34 of 227] Compiling Intervals        ( Intervals.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Intervals.o )
[ 35 of 227] Compiling GraphMap         ( GraphMap.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GraphMap.o )
[ 36 of 227] Compiling FStringCompat    ( FStringCompat.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/FStringCompat.o )
[ 37 of 227] Compiling PreStrings       ( PreStrings.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PreStrings.o )
[ 38 of 227] Compiling Eval             ( Eval.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Eval.o )
[ 39 of 227] Compiling VFileName        ( VFileName.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VFileName.o )
[ 40 of 227] Compiling Undefined        ( Undefined.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Undefined.o )
[ 41 of 227] Compiling Position         ( Position.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Position.o )
[ 42 of 227] Compiling MVarStrict       ( Libs/MVarStrict.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/MVarStrict.o )
[ 43 of 227] Compiling STP              ( ../vendor/stp/include_hs/STP.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/STP.o )
[ 44 of 227] Compiling IntLit           ( IntLit.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IntLit.o )
[ 45 of 227] Compiling Literal          ( Literal.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Literal.o )
[ 46 of 227] Compiling Id               ( Id.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Id.o )
[ 47 of 227] Compiling Verilog          ( Verilog.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Verilog.o )
[ 48 of 227] Compiling VPrims           ( VPrims.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VPrims.o )
[ 49 of 227] Compiling VVerilogDollar   ( VVerilogDollar.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VVerilogDollar.o )
[ 50 of 227] Compiling PreIds           ( PreIds.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PreIds.o )
[ 51 of 227] Compiling NumType          ( NumType.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/NumType.o )
[ 52 of 227] Compiling GraphWrapper     ( GraphWrapper.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GraphWrapper.o )
[ 53 of 227] Compiling GraphUtil        ( GraphUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GraphUtil.o )
[ 54 of 227] Compiling ConTagInfo       ( ConTagInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ConTagInfo.o )
[ 55 of 227] Compiling BoolExp          ( BoolExp.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BoolExp.o )
[ 56 of 227] Compiling Backend          ( Backend.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Backend.o )
[ 57 of 227] Compiling Flags            ( Flags.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Flags.o )
[ 58 of 227] Compiling PFPrint          ( PFPrint.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PFPrint.o )
[ 59 of 227] Compiling SchedInfo        ( SchedInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SchedInfo.o )
[ 60 of 227] Compiling Error            ( Error.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Error.o )
[ 61 of 227] Compiling SystemVerilogTokens ( SystemVerilogTokens.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemVerilogTokens.o )
[ 62 of 227] Compiling SystemVerilogScanner ( SystemVerilogScanner.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemVerilogScanner.o )
[ 63 of 227] Compiling SystemCheck      ( SystemCheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemCheck.o )
[ 64 of 227] Compiling ProofObligation  ( ProofObligation.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ProofObligation.o )
[ 65 of 227] Compiling Prim             ( Prim.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Prim.o )
[ 66 of 227] Compiling ParsecPrim       ( ../Parsec/ParsecPrim.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ParsecPrim.o )
[ 67 of 227] Compiling ParsecCombinator ( ../Parsec/ParsecCombinator.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ParsecCombinator.o )
[ 68 of 227] Compiling ParsecExpr       ( ../Parsec/ParsecExpr.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ParsecExpr.o )
[ 69 of 227] Compiling ParsecChar       ( ../Parsec/ParsecChar.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ParsecChar.o )
[ 70 of 227] Compiling Parsec           ( ../Parsec/Parsec.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parsec.o )
[ 71 of 227] Compiling Lex              ( Lex.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Lex.o )
[ 72 of 227] Compiling IdPrint          ( IdPrint.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IdPrint.o )
[ 73 of 227] Compiling VModInfo         ( VModInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VModInfo.o )
[ 74 of 227] Compiling Pragma           ( Pragma.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Pragma.o )
[ 75 of 227] Compiling FlagsDecode      ( FlagsDecode.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/FlagsDecode.o )
[ 76 of 227] Compiling FileIOUtil       ( FileIOUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/FileIOUtil.o )
[ 77 of 227] Compiling ErrorMonad       ( ErrorMonad.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ErrorMonad.o )
[ 78 of 227] Compiling DOT              ( DOT.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/DOT.o )
[ 79 of 227] Compiling CType            ( CType.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CType.o )
[ 80 of 227] Compiling Type             ( Type.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Type.o )
[ 81 of 227] Compiling Subst            ( Subst.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Subst.o )
[ 82 of 227] Compiling Unify            ( Unify.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Unify.o )
[ 83 of 227] Compiling PragmaCheck      ( PragmaCheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PragmaCheck.o )
[ 84 of 227] Compiling CSyntax          ( CSyntax.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CSyntax.o )
[ 85 of 227] Compiling PoisonUtils      ( PoisonUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/PoisonUtils.o )
[ 86 of 227] Compiling ParseOp          ( ParseOp.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ParseOp.o )
[ 87 of 227] Compiling GenWrapUtils     ( GenWrapUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenWrapUtils.o )
[ 88 of 227] Compiling CSyntaxUtil      ( CSyntaxUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CSyntaxUtil.o )
[ 89 of 227] Compiling IConvLet         ( IConvLet.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IConvLet.o )
[ 90 of 227] Compiling CVPrint          ( CVPrint.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CVPrint.o )
[ 91 of 227] Compiling KIMisc           ( KIMisc.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/KIMisc.o )
[ 92 of 227] Compiling CSyntaxTypes     ( CSyntaxTypes.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CSyntaxTypes.o )
[ 93 of 227] Compiling Pred             ( Pred.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Pred.o )
[ 94 of 227] Compiling Scheme           ( Scheme.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Scheme.o )
[ 95 of 227] Compiling Assump           ( Assump.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Assump.o )
[ 96 of 227] Compiling SymTab           ( SymTab.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SymTab.o )
[ 97 of 227] Compiling TIMonad          ( TIMonad.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TIMonad.o )
[ 98 of 227] Compiling StdPrel          ( StdPrel.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/StdPrel.o )
[ 99 of 227] Compiling IType            ( IType.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IType.o )
[100 of 227] Compiling IStateLoc        ( IStateLoc.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IStateLoc.o )
[101 of 227] Compiling Pred2STP         ( Pred2STP.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Pred2STP.o )
[102 of 227] Compiling CPPLineDirectives ( CPPLineDirectives.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CPPLineDirectives.o )
[103 of 227] Compiling SystemVerilogPreprocess ( SystemVerilogPreprocess.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemVerilogPreprocess.o )
[104 of 227] Compiling CFreeVars        ( CFreeVars.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CFreeVars.o )
[105 of 227] Compiling Parser.Classic.Warnings ( Parser/Classic/Warnings.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/Classic/Warnings.o )
[106 of 227] Compiling Parser.BSV.CVParserCommon ( Parser/BSV/CVParserCommon.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV/CVParserCommon.o )
[107 of 227] Compiling Parser.BSV.CVParserUtil ( Parser/BSV/CVParserUtil.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV/CVParserUtil.o )
[108 of 227] Compiling Parser.BSV.CVParserAssertion ( Parser/BSV/CVParserAssertion.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV/CVParserAssertion.o )
[109 of 227] Compiling Parser.BSV.CVParserImperative ( Parser/BSV/CVParserImperative.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV/CVParserImperative.o )
[110 of 227] Compiling InferKind        ( InferKind.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/InferKind.o )
[111 of 227] Compiling CSubst           ( CSubst.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CSubst.o )
[112 of 227] Compiling CCSyntax         ( CCSyntax.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CCSyntax.o )
[113 of 227] Compiling BoolOpt          ( BoolOpt.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BoolOpt.o )
[114 of 227] Compiling BinParse         ( BinParse.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BinParse.o )
[115 of 227] Compiling Parser.Classic.CParser ( Parser/Classic/CParser.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/Classic/CParser.o )
[116 of 227] Compiling Parser.Classic   ( Parser/Classic.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/Classic.o )
[117 of 227] Compiling Balanced         ( Balanced.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Balanced.o )
[118 of 227] Compiling SCC              ( SCC.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SCC.o )
[119 of 227] Compiling Simplify         ( Simplify.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Simplify.o )
[120 of 227] Compiling MakeSymTab       ( MakeSymTab.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/MakeSymTab.o )
[121 of 227] Compiling Wires            ( Wires.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Wires.o )
[122 of 227] Compiling ISyntax          ( ISyntax.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISyntax.o )
[123 of 227] Compiling InstNodes        ( InstNodes.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/InstNodes.o )
[124 of 227] Compiling IWireSet         ( IWireSet.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IWireSet.o )
[125 of 227] Compiling ISyntaxXRef      ( ISyntaxXRef.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISyntaxXRef.o )
[126 of 227] Compiling ISyntaxUtil      ( ISyntaxUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISyntaxUtil.o )
[127 of 227] Compiling ISimplify        ( ISimplify.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISimplify.o )
[128 of 227] Compiling IPrims           ( IPrims.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IPrims.o )
[129 of 227] Compiling IInlineUtil      ( IInlineUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IInlineUtil.o )
[130 of 227] Compiling IInline          ( IInline.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IInline.o )
[131 of 227] Compiling IDropRules       ( IDropRules.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IDropRules.o )
[132 of 227] Compiling FixupDefs        ( FixupDefs.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/FixupDefs.o )
[133 of 227] Compiling BExpr            ( BExpr.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BExpr.o )
[134 of 227] Compiling ITransform       ( ITransform.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ITransform.o )
[135 of 227] Compiling ISplitIf         ( ISplitIf.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISplitIf.o )
[136 of 227] Compiling ILift            ( ILift.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ILift.o )
[137 of 227] Compiling ASyntax          ( ASyntax.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ASyntax.o )
[138 of 227] Compiling TopUtils         ( TopUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TopUtils.o )
[139 of 227] Compiling Parser.BSV.CVParser ( Parser/BSV/CVParser.lhs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV/CVParser.o )
[140 of 227] Compiling Parser.BSV       ( Parser/BSV.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Parser/BSV.o )
[141 of 227] Compiling SimDomainInfo    ( SimDomainInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimDomainInfo.o )
[142 of 227] Compiling SignalNaming     ( SignalNaming.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SignalNaming.o )
[143 of 227] Compiling Params           ( Params.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Params.o )
[144 of 227] Compiling BinData          ( BinData.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BinData.o )
[145 of 227] Compiling GenBin           ( GenBin.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenBin.o )
[146 of 227] Compiling BinUtil          ( BinUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BinUtil.o )
[147 of 227] Compiling BackendNamingConventions ( BackendNamingConventions.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BackendNamingConventions.o )
[148 of 227] Compiling ASyntaxUtil      ( ASyntaxUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ASyntaxUtil.o )
[149 of 227] Compiling VIOProps         ( VIOProps.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VIOProps.o )
[150 of 227] Compiling VFinalCleanup    ( VFinalCleanup.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VFinalCleanup.o )
[151 of 227] Compiling SimPrimitiveModules ( SimPrimitiveModules.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimPrimitiveModules.o )
[152 of 227] Compiling InlineWires      ( InlineWires.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/InlineWires.o )
[153 of 227] Compiling InlineCReg       ( InlineCReg.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/InlineCReg.o )
[154 of 227] Compiling ForeignFunctions ( ForeignFunctions.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ForeignFunctions.o )
[155 of 227] Compiling SimCCBlock       ( SimCCBlock.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimCCBlock.o )
[156 of 227] Compiling IInlineFmt       ( IInlineFmt.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IInlineFmt.o )
[157 of 227] Compiling DPIWrappers      ( DPIWrappers.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/DPIWrappers.o )
[158 of 227] Compiling AVerilogUtil     ( AVerilogUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AVerilogUtil.o )
[159 of 227] Compiling VPIWrappers      ( VPIWrappers.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/VPIWrappers.o )
[160 of 227] Compiling InlineReg        ( InlineReg.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/InlineReg.o )
[161 of 227] Compiling AVerilog         ( AVerilog.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AVerilog.o )
[162 of 227] Compiling AVeriQuirks      ( AVeriQuirks.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AVeriQuirks.o )
[163 of 227] Compiling AUses            ( AUses.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AUses.o )
[164 of 227] Compiling RSchedule        ( RSchedule.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/RSchedule.o )
[165 of 227] Compiling ATaskSplice      ( ATaskSplice.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ATaskSplice.o )
[166 of 227] Compiling AScheduleInfo    ( AScheduleInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AScheduleInfo.o )
[167 of 227] Compiling ARenameIO        ( ARenameIO.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ARenameIO.o )
[168 of 227] Compiling ARemoveAssumps   ( ARemoveAssumps.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ARemoveAssumps.o )
[169 of 227] Compiling ARankMethCalls   ( ARankMethCalls.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ARankMethCalls.o )
[170 of 227] Compiling APaths           ( APaths.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/APaths.o )
[171 of 227] Compiling ANoInline        ( ANoInline.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ANoInline.o )
[172 of 227] Compiling AExpr2Util       ( AExpr2Util.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AExpr2Util.o )
[173 of 227] Compiling AExpr2STP        ( AExpr2STP.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AExpr2STP.o )
[174 of 227] Compiling ADumpScheduleInfo ( ADumpScheduleInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ADumpScheduleInfo.o )
[175 of 227] Compiling ADropUndet       ( ADropUndet.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ADropUndet.o )
[176 of 227] Compiling AConv            ( AConv.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AConv.o )
[177 of 227] Compiling AExpand          ( AExpand.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AExpand.o )
[178 of 227] Compiling ADropDefs        ( ADropDefs.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ADropDefs.o )
[179 of 227] Compiling ACheck           ( ACheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ACheck.o )
[180 of 227] Compiling ABin             ( ABin.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ABin.o )
[181 of 227] Compiling GenABin          ( GenABin.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenABin.o )
[182 of 227] Compiling GenForeign       ( GenForeign.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenForeign.o )
[183 of 227] Compiling ABinUtil         ( ABinUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ABinUtil.o )
[184 of 227] Compiling SimPackage       ( SimPackage.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimPackage.o )
[185 of 227] Compiling SystemCWrapper   ( SystemCWrapper.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SystemCWrapper.o )
[186 of 227] Compiling SimFileUtils     ( SimFileUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimFileUtils.o )
[187 of 227] Compiling SimBlocksToC     ( SimBlocksToC.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimBlocksToC.o )
[188 of 227] Compiling SimMakeCBlocks   ( SimMakeCBlocks.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimMakeCBlocks.o )
[189 of 227] Compiling SimExpand        ( SimExpand.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimExpand.o )
[190 of 227] Compiling SimCOpt          ( SimCOpt.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimCOpt.o )
[191 of 227] Compiling AAddScheduleDefs ( AAddScheduleDefs.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AAddScheduleDefs.o )
[192 of 227] Compiling YicesFFI         ( ../vendor/yices/include_hs/YicesFFI.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/YicesFFI.o )
[193 of 227] Compiling Yices            ( ../vendor/yices/include_hs/Yices.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Yices.o )
[194 of 227] Compiling Pred2Yices       ( Pred2Yices.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Pred2Yices.o )
[195 of 227] Compiling SATPred          ( SATPred.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SATPred.o )
[196 of 227] Compiling TCMisc           ( TCMisc.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TCMisc.o )
[197 of 227] Compiling TCPat            ( TCPat.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TCPat.o )
[198 of 227] Compiling ISyntaxCheck     ( ISyntaxCheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ISyntaxCheck.o )
[199 of 227] Compiling IExpandUtils     ( IExpandUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IExpandUtils.o )
[200 of 227] Compiling IConv            ( IConv.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IConv.o )
[201 of 227] Compiling IfcBetterInfo    ( IfcBetterInfo.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IfcBetterInfo.o )
[202 of 227] Compiling Deriving         ( Deriving.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Deriving.o )
[203 of 227] Compiling CtxRed           ( CtxRed.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/CtxRed.o )
[204 of 227] Compiling ContextErrors    ( ContextErrors.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ContextErrors.o )
[205 of 227] Compiling TCheck           ( TCheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TCheck.o )
[206 of 227] Compiling TypeCheck        ( TypeCheck.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TypeCheck.o )
[207 of 227] Compiling IExpand          ( IExpand.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/IExpand.o )

IExpand.hs:3663:13: warning:
    Pattern match checker ran into -fmax-pmcheck-models=30 limit, so
      • Redundant clauses might not be reported at all
      • Redundant clauses might be reported as inaccessible
      • Patterns reported as unmatched might actually be matched
    Increase the limit or resolve the warnings to suppress this message.
     |
3663 |             case doPrimOp bestPosition op
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

IExpand.hs:3663:13: warning: [-Wincomplete-patterns]
    Pattern match(es) are non-exhaustive
    In a case alternative:
        Patterns not matched:
            Just _
            Just _
            Just _
            Just _
            ...
     |
3663 |             case doPrimOp bestPosition op
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
[208 of 227] Compiling GenWrap          ( GenWrap.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenWrap.o )
[209 of 227] Compiling GenSign          ( GenSign.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenSign.o )
[210 of 227] Compiling GenFuncWrap      ( GenFuncWrap.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GenFuncWrap.o )
[211 of 227] Compiling Depend           ( Depend.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Depend.o )
[212 of 227] Compiling AExpr2Yices      ( AExpr2Yices.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AExpr2Yices.o )
[213 of 227] Compiling SAT              ( SAT.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SAT.o )
[214 of 227] Compiling AProofs          ( AProofs.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AProofs.o )
[215 of 227] Compiling AOpt             ( AOpt.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AOpt.o )
[216 of 227] Compiling Synthesize       ( Synthesize.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Synthesize.o )
[217 of 227] Compiling SimPackageOpt    ( SimPackageOpt.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SimPackageOpt.o )
[218 of 227] Compiling LambdaCalcUtil   ( LambdaCalcUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/LambdaCalcUtil.o )
[219 of 227] Compiling SAL              ( SAL.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/SAL.o )
[220 of 227] Compiling LambdaCalc       ( LambdaCalc.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/LambdaCalc.o )
[221 of 227] Compiling ADumpSchedule    ( ADumpSchedule.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ADumpSchedule.o )
[222 of 227] Compiling DisjointTest     ( DisjointTest.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/DisjointTest.o )
[223 of 227] Compiling ASchedule        ( ASchedule.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ASchedule.o )
[224 of 227] Compiling AState           ( AState.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AState.o )
[225 of 227] Compiling AAddSchedAssumps ( AAddSchedAssumps.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/AAddSchedAssumps.o )
[226 of 227] Compiling ACleanup         ( ACleanup.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/ACleanup.o )
[227 of 227] Compiling Main_bsc         ( bsc.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/Main_bsc.o )
Linking bsc ...
bsc done Fri Aug 11 16:44:05 CEST 2023

bluetcl start Fri Aug 11 16:44:05 CEST 2023
ghc -dynamic -hidir /build/bluespec-git/src/bsc/src/comp/../../build/comp -odir /build/bluespec-git/src/bsc/src/comp/../../build/comp -stubdir /build/bluespec-git/src/bsc/src/comp/../../build/comp -O2 -hide-all-packages -fasm -Wall -fno-warn-orphans -fno-warn-name-shadowing -fno-warn-unused-matches -package base -package containers -package array -package mtl -package unix -package regex-compat -package bytestring -package directory -package process -package filepath -package time -package old-time -package old-locale -package split -package syb -package integer-gmp  -iGHC -iGHC/posix -iLibs -i../Parsec -i../vendor/stp/include_hs -i../vendor/yices/include_hs -i../vendor/htcl '-tmpdir /tmp'  -I../vendor/stp/include -I../vendor/yices/include -L../vendor/htcl   -lpthread --make bluetcl -j4 +RTS -M5G -A128m -RTS -c
[145 of 151] Compiling GlobPattern      ( GlobPattern.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/GlobPattern.o )
[146 of 151] Compiling HTcl             ( ../vendor/htcl/HTcl.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/HTcl.o )
[147 of 151] Compiling TclUtils         ( TclUtils.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TclUtils.o )
[148 of 151] Compiling BluesimLoader    ( BluesimLoader.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BluesimLoader.o )
[149 of 151] Compiling TypeAnalysis     ( TypeAnalysis.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TypeAnalysis.o )
[150 of 151] Compiling TypeAnalysisTclUtil ( TypeAnalysisTclUtil.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/TypeAnalysisTclUtil.o )
[151 of 151] Compiling BlueTcl          ( bluetcl.hs, /build/bluespec-git/src/bsc/src/comp/../../build/comp/BlueTcl.o )
ghc -dynamic -hidir /build/bluespec-git/src/bsc/src/comp/../../build/comp -odir /build/bluespec-git/src/bsc/src/comp/../../build/comp -stubdir /build/bluespec-git/src/bsc/src/comp/../../build/comp -O2 -hide-all-packages -fasm -Wall -fno-warn-orphans -fno-warn-name-shadowing -fno-warn-unused-matches -package base -package containers -package array -package mtl -package unix -package regex-compat -package bytestring -package directory -package process -package filepath -package time -package old-time -package old-locale -package split -package syb -package integer-gmp  -iGHC -iGHC/posix -iLibs -i../Parsec -i../vendor/stp/include_hs -i../vendor/yices/include_hs -i../vendor/htcl '-tmpdir /tmp'  -I../vendor/stp/include -I../vendor/yices/include -L../vendor/htcl   -lpthread --make bluetcl -j4 +RTS -M5G -A128m -RTS -L../vendor/stp/lib -lstp -L../vendor/yices/lib -lyices  -ltcl8.6 -ltclstub8.6 -lhtcl  \
	-o bluetcl \
	-no-hs-main \
	-x c bluetcl_Main.hsc
Linking bluetcl ...
bluetcl done Fri Aug 11 16:44:25 CEST 2023

mkdir -p -m 755 /build/bluespec-git/src/bsc/inst/bin/core
install -m 755 bsc /build/bluespec-git/src/bsc/inst/bin/core/bsc
mkdir -p -m 755 /build/bluespec-git/src/bsc/inst/bin
install -m 755 wrapper.sh /build/bluespec-git/src/bsc/inst/bin/bsc
mkdir -p -m 755 /build/bluespec-git/src/bsc/inst/bin/core
install -m 755 bluetcl /build/bluespec-git/src/bsc/inst/bin/core/bluetcl
mkdir -p -m 755 /build/bluespec-git/src/bsc/inst/bin
install -m 755 wrapper.sh /build/bluespec-git/src/bsc/inst/bin/bluetcl
make[2]: Leaving directory '/build/bluespec-git/src/bsc/src/comp'
make  -C Libraries  PREFIX=/build/bluespec-git/src/bsc/inst  install
make[2]: Entering directory '/build/bluespec-git/src/bsc/src/Libraries'
make -C Base1 build &&  make -C Base2 build &&  make -C Base3-Misc build &&  make -C Base3-Contexts build &&  make -C Base3-Math build && true
make[3]: Entering directory '/build/bluespec-git/src/bsc/src/Libraries/Base1'
mkdir -p /build/bluespec-git/src/bsc/build/bsvlib
/build/bluespec-git/src/bsc/inst/bin/bsc -stdlib-names -bdir /build/bluespec-git/src/bsc/build/bsvlib -p . -vsearch /build/bluespec-git/src/bsc/build/bsvlib -no-use-prelude Prelude.bs
/build/bluespec-git/src/bsc/inst/bin/core/bsc: error while loading shared libraries: libstp_stub.so: cannot open shared object file: No such file or directory
make[3]: *** [Makefile:26: /build/bluespec-git/src/bsc/build/bsvlib/Prelude.bo] Error 127
make[3]: Leaving directory '/build/bluespec-git/src/bsc/src/Libraries/Base1'
make[2]: *** [Makefile:31: build] Error 2
make[2]: Leaving directory '/build/bluespec-git/src/bsc/src/Libraries'
make[1]: *** [Makefile:62: install] Error 2
make[1]: Leaving directory '/build/bluespec-git/src/bsc/src'
make: *** [GNUmakefile:41: install-src] Error 2
@quark17
Copy link
Collaborator

quark17 commented Aug 12, 2023

I didn't realize that this hadn't been fixed! There's a PR #278 open for it. From years ago -- apologies for letting that slip through the cracks!

The issue is that the real STP build leaves this in the src/vendor/stp/lib/ directory:

lrwxrwxrwx ... libstp.so -> libstp.so.1
-rwxr-xr-x ... 2 libstp.so.1

while the stub STP build leaves this:

lrwxrwxrwx ... libstp.so -> libstp.so.1
lrwxrwxrwx ... libstp.so.1 -> libstp_stub.so
-rwxr-xr-x ... libstp_stub.so

The build of the bsc executable in src/comp/ is told to look in that directory for libraries, so it can see all the versions:

STP_LIB_FLAGS = -L../vendor/stp/lib -lstp

And I believe that it follows the links and thus knows what the ultimate name of the library is, and encodes that in the executable. For example, BSC built with the real STP has the following output from ldd bsc:

libstp.so.1 => ...

while BSC built with the stub STP has this ldd bsc output:

libstp_stub.so => ...

So when BSC is run, it needs to find that exact file name in the LD search patch. That would be fine, if we installed all of the file from src/vendor/stp/lib/ into inst/lib/SAT/. But we don't; we only install the file libstp.so.1 as indicated in src/vendor/stp/Makefile:

ifeq ($(OSTYPE), Darwin)
SNAME=libstp.dylib
else
SNAME=libstp.so.1
endif

install:
        ...
        install -m 644 lib/$(SNAME) $(PREFIX)/lib/SAT

This works for BSC built with real STP, but doesn't work for BSC built with the sub (which is expecting to find libstp_stub.so.

The PR #278 attempts to make the STP stub situation work by installing multiple files (the variable SNAME becomes a list of names to install). Do we need to install them all, though? An alternative would be to still install only one name, and just have that name be libstp_stub.so in the stub case. Or, we change the stub build to create libstp.so.1 as the library name, so that the built bsc executable is looking for the same library name in either case. I can see some benefit to having the name indicate that it's a stub, though, so I'm in favor of a different name.

Any preference?

I'm in favor of installing one name, maybe like this:

ifeq ($(STP_STUB),)
SRC = src
else
SRC = src_stub
endif

ifeq ($(OSTYPE), Darwin)

ifeq ($(STP_STUB),)
SNAME = libstp.dylib
else
SNAME = libstp_stub.dylib
endif

else

ifeq ($(STP_STUB),)
SNAME = libstp.so.1
else
SNAME = libstp_stub.so
endif

endif

Or we could fix up the stub Makefile to buld libstp_stub.so.1 and clean up the name construction like this:

ifeq ($(STP_STUB),)
SRC = src
LIBNAME = stp
else
SRC = src_stub
LIBNAME = stp_stub
endif

ifeq ($(OSTYPE), Darwin)
SNAME = lib$(LIBNAME).dylib
else
SNAME = lib$(LIBNAME).so.1
endif

FYI, I notice that trying to build STP_STUB=1 on macOS fails even earlier, because there is no file libstp.dylib (or even libstp_stub.dylib), because the build of the stub specifies .so in the file name. We can change that to .dylib or not; whatever we do should be consistent between the makefiles.

@Vekhir
Copy link
Contributor Author

Vekhir commented Aug 13, 2023

I've been working to overhaul the STP_STUB behavior, so I've fixed it there in section "disable STP at runtime".
Essentially, the SNAME is exported to the different Makefiles below to ensure consistency in naming and a single place where the name can change. It's quite similar to the first suggestion.

The fix could be backported to work with the old STP_STUB, but with the new API, we could use this opportunity to remove STP_STUB since it was already broken for years (instead of fixing it and annoying people when removing it later).

@quark17
Copy link
Collaborator

quark17 commented Aug 14, 2023

We're trying to get a 2023.07 release out. The overhaul needs some discussion, so I don't want to hold up a release for it. I'd just like to get the code in a stable form, to tag a release. The stub flag behaviors have been this way for a while, so it's not a problem to leave it, except that I did add mention of the STP_STUB and YICES_STUB flags to the build instructions. It feels wrong to document it if it's broken -- either we should remove that mention from the docs, or we should quickly fix it up. Unless I'm overreacting and it's fine to document it and leave the behavior as it is?

My thought was just to get STP_STUB=1 to successfully build, by changing the stub object file to have the same name (and maybe install it with a link, so that it's clear to people looking at the installed files that it's a stub, while still being available for loading as the generic name); and to leave the Yices behavior as is, because anyone building with YICES_STUB=1 is already encountering the need to explicitly add -sat-stp when calling BSC. That should be a simple fix and then we can make a release.

On your overhaul, I have some thoughts, but maybe I should wait until I've looked at it more. But off the top of head, I wonder if a build with the system library should just not install any object file and use what's in the system. (I guess that depends on whether such a build wants to require the users to also have the library installed.) Also, my sense has been that an installation can change -- like, if it started with a yices stub, but then someone wanted to add yices, they could change what's in the lib/SAT/ directory (either put a real library in that directory or remove the stub and let the one from the system be found) -- and if that's the perspective we want to support, then the bsc binary should always be looking for the generic name (which can be a link to different implementations) and not looking for an implementation-specific name depending on how the installation was built (like libstp_stub.so or libstp_system.so etc). Also, there have been a lot of proposals of how to replace the current STP/Yices integration with other ways of doing things (see open issues/discussions mentioning STP); if we're putting effort into an overhaul, would it be better to put the effort into one of those bigger overhauls? (At the very least, we might consider using a newer STP. The snapshot we have doesn't have a version function, so we can't even warn the user that the library that's found doesn't match, and I see that the STP in github has a function for getting the version tag.)

@Vekhir
Copy link
Contributor Author

Vekhir commented Aug 14, 2023

We're trying to get a 2023.07 release out. The overhaul needs some discussion, so I don't want to hold up a release for it. I'd just like to get the code in a stable form, to tag a release. The stub flag behaviors have been this way for a while, so it's not a problem to leave it, except that I did add mention of the STP_STUB and YICES_STUB flags to the build instructions.

In that case I'd say to postpone this fix until after the release. The feature is so obviously broken that everyone can tell not to use it (or patch it, in which case they are on their own). If this was a subtle bug somewhere, that'd be different.

[...] It feels wrong to document [the STP_STUB and YICES_STUB flags] if it's broken -- either we should remove that mention from the docs, or we should quickly fix it up. Unless I'm overreacting and it's fine to document it and leave the behavior as it is?

Of course, documenting it without testing wasn't a great decision, but the feature is intended to exist, so the documentation isn't wrong per se.
Maybe put a "Known issues" section in the release notes where it says that using the flags (both STP_STUB and YICES_STUB) leads to build failures?

My thought was just to get STP_STUB=1 to successfully build [...]

Any my thought was to precisely not do that if we intend to deprecate it shortly afterwards. If it's absolutely necessary, then getting it to build isn't actually all that difficult (like the NixOS guys have been doing) - and then they know that it might not work with the next release, when the refactor came in.

My thought was just to get STP_STUB=1 to successfully build, by changing the stub object file to have the same name (and maybe install it with a link, so that it's clear to people looking at the installed files that it's a stub, while still being available for loading as the generic name); and to leave the Yices behavior as is, because anyone building with YICES_STUB=1 is already encountering the need to explicitly add -sat-stp when calling BSC. That should be a simple fix and then we can make a release.

If I build it explicitly with the stub, then I'd want STP to be disabled. So not sure why it needs to be available for loading as the generic name. It doesn't need to change. If I later change my mind, then I either have to rebuild BSC (because a build option has changed) or rename my library *_stub if I'm too lazy for that.
Of course we can add an option STP_USE_LIB=disable-at-buildtime-but-maybe-I-change-my-mind-at-runtime which does the desired behavior. The refactored code allows for that.

leave the Yices behavior as is, because anyone building with YICES_STUB=1 is already encountering the need to explicitly add -sat-stp when calling BSC.

On Yices, I don't want to change any behavior, only the flag is supposed to be mirrored in the refactor. If that note comes from the misunderstanding in #599, then we are on the same side.

Thoughts on overhaul/refactor

On your overhaul, I have some thoughts, but maybe I should wait until I've looked at it more. [... Lots of thoughts cut for brevity ...]

Yeah, that's an entirely different discussion, I've opened the draft PR #600 so we can discuss that there.
In short - to not pollute this thread, your thoughts are much appreciated - the big overhaul has two limiting factors on my side:

  1. Me wanting to avoid feature creep that leads to lots of changes which in turn delay actually merging all of it, and
  2. Me simply not being able to implement the other suggestions. Doesn't mean I can't learn it, but at the moment I'm not particularly interested in that. Also means more delay.

So I settled for a refactor - "overhaul" probably set the wrong expectations - of the Makefiles in order to get a quick and immediate improvement. This discussion should be continued in the draft PR though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants