diff --git a/abc-build.patch b/abc-build.patch index e4a0c99..7952074 100644 --- a/abc-build.patch +++ b/abc-build.patch @@ -1,11 +1,11 @@ ---- CMakeLists.txt.orig 2019-05-30 20:27:31.000000000 -0600 -+++ CMakeLists.txt 2019-06-04 09:41:14.524445396 -0600 +--- CMakeLists.txt.orig 2019-12-17 15:57:46.000000000 -0700 ++++ CMakeLists.txt 2019-12-18 09:13:25.779458679 -0700 @@ -53,7 +53,7 @@ execute_process( make ${ABC_READLINE_FLAGS} ${ABC_USE_NAMESPACE_FLAGS} - ARCHFLAGS_EXE=${CMAKE_CURRENT_BINARY_DIR}/abc_arch_flags_program.exe -+ ABC_USE_STDINT_H=1 ++ ABC_USE_STDINT_H=1 ABC_MAKE_NO_DEPS=1 CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} diff --git a/abc-format.patch b/abc-format.patch index bf00519..8ba0e49 100644 --- a/abc-format.patch +++ b/abc-format.patch @@ -1,34 +1,27 @@ ---- src/aig/aig/aigUtil.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/aig/aig/aigUtil.c 2019-06-04 09:42:11.236444258 -0600 -@@ -725,7 +725,7 @@ void Aig_ManPrintVerbose( Aig_Man_t * p, - void Aig_ManDump( Aig_Man_t * p ) - { - static int Counter = 0; -- char FileName[20]; -+ char FileName[24]; - // dump the logic into a file - sprintf( FileName, "aigbug\\%03d.blif", ++Counter ); - Aig_ManDumpBlif( p, FileName, NULL, NULL ); ---- src/aig/gia/giaScript.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/aig/gia/giaScript.c 2019-06-04 09:42:11.237444240 -0600 -@@ -610,10 +610,10 @@ void Gia_ManPerformFlow( int fIsMapped, - void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, int nCutNum, int fBalance, int fMinAve, int fUseMfs, int fVerbose ) +--- src/aig/miniaig/ndr.h.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/aig/miniaig/ndr.h 2019-12-18 09:47:14.076891270 -0700 +@@ -496,8 +496,16 @@ static inline void Ndr_WriteVerilog( cha { - char Comm1[100], Comm2[100], Comm3[100], Comm4[100]; -- sprintf( Comm1, "&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm2, "&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm3, "&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -- sprintf( Comm4, "&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm1, 100U, "&synch2 -K %d -C 500; &if -m%s -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm2, 100U, "&dch -C 500; &if -m%s -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm3, 100U, "&synch2 -K %d -C 500; &lf -m%s -E 5 -K %d -C %d; %s &save", nLutSize, fMinAve?"t":"", nLutSize, nCutNum, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); -+ snprintf( Comm4, 100U, "&dch -C 500; &lf -m%sk -E 5 -K %d -C %d; %s &save", fMinAve?"t":"", nLutSize, nCutNum+4, fUseMfs ? "&put; mfs2 -W 4 -M 500 -C 7000; &get -m;":"" ); + Ndr_Data_t * p = (Ndr_Data_t *)pDesign; int Mod; + +- FILE * pFile = pFileName ? fopen( pFileName, "wb" ) : stdout; +- if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } ++ FILE * pFile; ++ if (pFileName) ++ { ++ pFile = fopen( pFileName, "wb" ); ++ if ( pFile == NULL ) { printf( "Cannot open file \"%s\" for writing.\n", pFileName ); return; } ++ } ++ else ++ { ++ pFile = stdout; ++ } - // perform synthesis - if ( fVerbose ) ---- src/base/abci/abcMiter.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/abci/abcMiter.c 2019-06-04 09:42:11.238444223 -0600 -@@ -860,7 +860,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr + Ndr_DesForEachMod( p, Mod ) + Ndr_WriteVerilogModule( pFile, p, Mod, pNames ); +--- src/base/abci/abcMiter.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/abci/abcMiter.c 2019-12-18 09:44:30.567338848 -0700 +@@ -863,7 +863,7 @@ void Abc_NtkAddFrame( Abc_Ntk_t * pNtkFr { int fVerbose = 0; int NodeBef = Abc_NtkNodeNum(pNtkFrames); @@ -37,8 +30,17 @@ Abc_Obj_t * pNode, * pLatch; int i; // create the prefix to be added to the node names ---- src/base/io/ioReadBlifMv.c.orig 2019-06-04 09:40:32.232191985 -0600 -+++ src/base/io/ioReadBlifMv.c 2019-06-04 09:42:11.239444205 -0600 +--- src/base/io/ioReadBlifMv.c.orig 2019-12-18 09:43:13.388550105 -0700 ++++ src/base/io/ioReadBlifMv.c 2019-12-18 09:43:30.483503314 -0700 +@@ -1626,7 +1626,7 @@ static int Io_MvParseLineMv( Io_MvMod_t + ***********************************************************************/ + static int Io_MvWriteValues( Abc_Obj_t * pNode, Vec_Str_t * vFunc ) + { +- char Buffer[10]; ++ char Buffer[12]; + Abc_Obj_t * pFanin; + int i; + // add the fanin number of values @@ -1656,7 +1656,7 @@ static int Io_MvWriteValues( Abc_Obj_t * ***********************************************************************/ static int Io_MvParseLiteralMv( Io_MvMod_t * p, Abc_Obj_t * pNode, char * pToken, Vec_Str_t * vFunc, int iLit ) @@ -48,20 +50,9 @@ Io_MvVar_t * pVar; Abc_Obj_t * pFanin, * pNet; char * pCur, * pNext; ---- src/base/ver/verCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/ver/verCore.c 2019-06-04 09:42:11.240444188 -0600 -@@ -1171,7 +1171,7 @@ int Ver_ParseAssign( Ver_Man_t * pMan, A - pNode = Abc_NtkCreateNodeBuf( pNtk, pNet ); - - // get the fanout net -- sprintf( Buffer2, "%s[%d]", Buffer, Bit ); -+ snprintf( Buffer2, 1000U, "%s[%d]", Buffer, Bit ); - pNet = Ver_ParseFindNet( pNtk, Buffer2 ); - if ( pNet == NULL ) - { ---- src/base/wlc/wlcNdr.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/wlc/wlcNdr.c 2019-06-04 09:42:11.241444170 -0600 -@@ -478,7 +478,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData +--- src/base/wlc/wlcNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/wlc/wlcNdr.c 2019-12-18 08:43:25.865457806 -0700 +@@ -487,7 +487,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) { @@ -70,8 +61,8 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/base/wln/wlnNdr.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/base/wln/wlnNdr.c 2019-06-04 09:42:11.242444152 -0600 +--- src/base/wln/wlnNdr.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/base/wln/wlnNdr.c 2019-12-18 08:43:25.866457804 -0700 @@ -256,7 +256,7 @@ Wln_Ntk_t * Wln_NtkFromNdr( void * pData pNtk->pManName = Abc_NamStart( NameIdMax+1, 10 ); for ( i = 1; i <= NameIdMax; i++ ) @@ -81,28 +72,8 @@ NameId = Abc_NamStrFindOrAdd( pNtk->pManName, pName, &fFound ); assert( !fFound && i == NameId ); } ---- src/bdd/cas/casCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/bdd/cas/casCore.c 2019-06-04 09:42:11.243444135 -0600 -@@ -259,7 +259,7 @@ int Abc_CascadeExperiment( char * pFileG - if ( fCheck ) - { - char Command[200]; -- sprintf( Command, "cec %s %s", FileNameIni, FileNameFin ); -+ snprintf( Command, 200U, "cec %s %s", FileNameIni, FileNameFin ); - Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command ); - } - ---- src/opt/dau/dauMerge.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/opt/dau/dauMerge.c 2019-06-04 09:42:11.243444135 -0600 -@@ -661,7 +661,7 @@ printf( "%s\n", pDsd1 ); - nVarsShared = Dau_DsdMergeFindShared(pDsd0, pDsd1, pMatches0, pMatches1, pVarPres); - if ( nVarsShared == 0 ) - { -- sprintf( pRes, "(%s%s)", pDsd0, pDsd1 ); -+ snprintf( pRes, DAU_MAX_STR, "(%s%s)", pDsd0, pDsd1 ); - if ( fVerbose ) - printf( "Disjoint:\n" ); - if ( fVerbose ) +--- src/opt/dau/dauMerge.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/opt/dau/dauMerge.c 2019-12-18 09:48:48.630632559 -0700 @@ -715,7 +715,7 @@ Dau_DsdMergeStorePrintDefs( pS ); // create new function @@ -112,25 +83,14 @@ pTruth = Dau_DsdToTruth( pS->pOutput, nVarsTotal ); Status = Dau_DsdDecompose( pTruth, nVarsTotal, 0, 1, pS->pOutput ); //printf( "%d ", Status ); ---- src/proof/fra/fraCore.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/proof/fra/fraCore.c 2019-06-04 09:42:11.243444135 -0600 -@@ -156,7 +156,7 @@ int Fra_FraigMiterAssertedOutput( Aig_Ma - static inline void Fra_FraigNodeSpeculate( Fra_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pObjFraig, Aig_Obj_t * pObjReprFraig ) - { - static int Counter = 0; -- char FileName[20]; -+ char FileName[24]; - Aig_Man_t * pTemp; - Aig_Obj_t * pNode; - int i; ---- src/sat/bmc/bmcMaj.c.orig 2019-05-30 20:27:31.000000000 -0600 -+++ src/sat/bmc/bmcMaj.c 2019-06-04 09:42:11.243444135 -0600 -@@ -585,7 +585,7 @@ void Exa_ManDumpBlif( Exa_Man_t * p, int - Extra_PrintHexadecimalString( Buffer, (unsigned *)p->pTruth, p->nVars ); - if ( fCompl ) - Abc_TtNot( p->pTruth, p->nWords ); -- sprintf( FileName, "%s_%d_%d.blif", Buffer, 2, p->nNodes ); -+ snprintf( FileName, 1000U, "%s_%d_%d.blif", Buffer, 2, p->nNodes ); - pFile = fopen( FileName, "wb" ); - fprintf( pFile, "# Realization of the %d-input function %s using %d two-input gates:\n", p->nVars, Buffer, p->nNodes ); - fprintf( pFile, ".model %s_%d_%d\n", Buffer, 2, p->nNodes ); +--- src/proof/fra/fraCore.c.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/proof/fra/fraCore.c 2019-12-18 09:50:22.838375767 -0700 +@@ -163,7 +163,7 @@ static inline void Fra_FraigNodeSpeculat + // create manager with the logic for these two nodes + pTemp = Aig_ManExtractMiter( p->pManFraig, pObjFraig, pObjReprFraig ); + // dump the logic into a file +- sprintf( FileName, "aig\\%03d.blif", ++Counter ); ++ snprintf( FileName, 20U, "aig\\%03d.blif", ++Counter ); + Aig_ManDumpBlif( pTemp, FileName, NULL, NULL ); + printf( "Speculation cone with %d nodes was written into file \"%s\".\n", Aig_ManNodeNum(pTemp), FileName ); + // clean up diff --git a/abc-giaDeep.patch b/abc-giaDeep.patch new file mode 100644 index 0000000..3dba0cc --- /dev/null +++ b/abc-giaDeep.patch @@ -0,0 +1,10 @@ +--- src/aig/gia/module.make.orig 2019-12-17 15:57:46.000000000 -0700 ++++ src/aig/gia/module.make 2019-12-18 09:15:32.619098847 -0700 +@@ -16,6 +16,7 @@ SRC += src/aig/gia/giaAig.c \ + src/aig/gia/giaCSat2.c \ + src/aig/gia/giaCTas.c \ + src/aig/gia/giaCut.c \ ++ src/aig/gia/giaDeep.c \ + src/aig/gia/giaDfs.c \ + src/aig/gia/giaDup.c \ + src/aig/gia/giaEdge.c \ diff --git a/abc.1 b/abc.1 index f21dbce..cb64b7f 100644 --- a/abc.1 +++ b/abc.1 @@ -28,6 +28,9 @@ Execute commands \fICMD\fP quietly. \fB\-C\fP \fICMD\fP Execute commands \fICMD\fP, then continue in interactive mode. .TP +\fB\-Q\fP \fICMD\fP +Execute commands \fICMD\fP quietly, then continue in interactive mode. +.TP \fB\-F\fP \fISCRIPT\fP Execute commands from script file \fISCRIPT\fP and echo commands. .TP diff --git a/abc.rpmlintrc b/abc.rpmlintrc new file mode 100644 index 0000000..735aa47 --- /dev/null +++ b/abc.rpmlintrc @@ -0,0 +1,5 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# There is no documentation to include +addFilter(r'^abc-(devel|libs)\.[^:]+: W: no-documentation') diff --git a/abc.spec b/abc.spec index ac1d1fd..09777f2 100644 --- a/abc.spec +++ b/abc.spec @@ -1,8 +1,8 @@ # Upstream doesn't make releases. We have to check the code out of git. %global owner berkeley-abc -%global gittag 35280f30504ad16f1d0ab005905883bee883747c +%global gittag 02393a2a7af6b45766830f111923cb2f56f28dad %global shorttag %(cut -b -7 <<< %{gittag}) -%global gitdate 20190608 +%global gitdate 20191217 # WARNING: When updating to a newer snapshot, because upstream doesn't do # shared library versioning, run abipkgdiff (from libabigail) against the @@ -20,7 +20,7 @@ Name: abc Version: 1.01 -Release: 23.git%{gitdate}%{?dist} +Release: 24.git%{gitdate}%{?dist} Summary: Sequential logic synthesis and formal verification License: MIT @@ -39,12 +39,14 @@ Patch2: %{name}-header.patch Patch3: %{name}-build.patch # Fix sprintf calls that can overflow their buffers Patch4: %{name}-format.patch +# Fix undefined symbols due to not compiling giaDeep.c +Patch5: %{name}-giaDeep.patch -BuildRequires: bzip2-devel BuildRequires: cmake BuildRequires: gcc-c++ -BuildRequires: readline-devel -BuildRequires: zlib-devel +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(readline) +BuildRequires: pkgconfig(zlib) Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -89,7 +91,7 @@ sed 's/@VERSION@/%{version} (%{gitdate})/' %{SOURCE1} > %{name}.1 touch -r %{SOURCE1} %{name}.1 %build -export CFLAGS="%{optflags} -DNDEBUG -I%{_includedir}/cudd" +export CFLAGS="%{optflags} -DNDEBUG" export CXXFLAGS="$CFLAGS" %cmake -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES . %make_build ABC_MAKE_VERBOSE=1 ABC_USE_STDINT_H=1 @@ -130,6 +132,10 @@ install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1 %{_libdir}/lib%{name}.so %changelog +* Wed Dec 18 2019 Jerry James - 1.01-24.git20191217 +- Update to latest git snapshot +- Add -giaDeep patch to fix build failure + * Wed Jul 24 2019 Fedora Release Engineering - 1.01-23.git20190608 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index f866bda..02405d2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abc-35280f3.tar.gz) = d18c6509ad0efa2c98cbd3aa5d22d3b302147bad34fa438100b603febded2df7ea16040c766ebc17b6ac35b84a41bf453907560885c26d5a47a76440b097c3fa +SHA512 (abc-02393a2.tar.gz) = 3bdd03f6d3bb0e0c3e43aff4ed67fc981935541bc8b334785390993e8b29f99ae930980f810e99a31263236e00d51750ee6d951ae17322615aea68c6074a6e07