Chair-for-Security-Engineering / AGEMA

Automated Generation of Masked Hardware
Other
17 stars 2 forks source link

Update Sylvan version dependancy #1

Open AdrianMarotzke opened 3 years ago

AdrianMarotzke commented 3 years ago

In Sylvan version 1.6, there were major changes, and the API has changed, see https://github.com/trolando/sylvan/commit/f6262656a4f31b658fa7336c8e284d7c87479c81.

Agema no longer compiles with Sylvan >= 1.6.0, with the following error message:

In file included from src/AGEMA.cpp:34:0: ./inc/conversion.hpp: In function 'void setupBDD()': ./inc/conversion.hpp:129:19: error: 'lace_init' was not declared in this scope lace_init(4, 0); ^ ./inc/conversion.hpp:130:31: error: 'lace_startup' was not declared in this scope lace_startup(0, NULL, NULL); ^ ./inc/conversion.hpp: In function 'void closeBDD()': ./inc/conversion.hpp:140:15: error: 'lace_exit' was not declared in this scope lace_exit(); ^ make[1]: [build/release/AGEMA.o] Error 1 make: [release] Error 2

Building still works with Sylvan v1.5.0.

zzulb commented 3 years ago

I also encountered the same problem, with Sylvan v1.5.0 still the same, how can I solve it?

[root@localhost AGEMA]# make release BUILDING (RELEASE) In file included from src/AGEMA.cpp:34:0: ./inc/conversion.hpp: In function ‘void setupBDD()’: ./inc/conversion.hpp:129:5: error: ‘lace_init’ was not declared in this scope lace_init(4, 0); ^~~~~ ./inc/conversion.hpp:129:5: note: suggested alternative: ‘lace_drop’ lace_init(4, 0); ^~~~~ lace_drop ./inc/conversion.hpp:130:5: error: ‘lace_startup’ was not declared in this scope lace_startup(0, NULL, NULL); ^~~~ ./inc/conversion.hpp:130:5: note: suggested alternative: ‘lace_start’ lace_startup(0, NULL, NULL); ^~~~ lace_start ./inc/conversion.hpp: In function ‘void closeBDD()’: ./inc/conversion.hpp:140:5: error: ‘lace_exit’ was not declared in this scope lace_exit(); ^~~~~ ./inc/conversion.hpp:140:5: note: suggested alternative: ‘lace_drop’ lace_exit(); ^~~~~ lace_drop make[1]: [Makefile:144:build/release/AGEMA.o] 错误 1 make: [Makefile:108:release] 错误 2

zzulb commented 3 years ago

Now I have a new problem. *.so has been compiled, but there are still errors. I don’t know why, is it a problem with the operating system? My system is centos 7.

[root@localhost AGEMA]# make release BUILDING (RELEASE) In file included from ./inc/sylvan.h:45:0, from ./inc/conversion.hpp:37, from src/AGEMA.cpp:34: ./inc/lace.h: In function ‘Worker lace_steal(WorkerP, Task, Worker)’: ./inc/lace.h:619:28: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] register TailSplit ts; ^~ ./inc/lace.h:622:32: warning: ISO C++1z does not allow ‘register’ storage class specifier [-Wregister] register TailSplit ts_new; ^~ ./build/release/AGEMA.o:在函数‘setupCUDD()’中: AGEMA.cpp:(.text+0xb7d3):对‘defaultError(std::string)’未定义的引用 AGEMA.cpp:(.text+0xb7d8):对‘Cudd::Cudd(unsigned int, unsigned int, unsigned int, unsigned int, unsigned long, void ()(std::string))’未定义的引用 AGEMA.cpp:(.text+0xb7e7):对‘Cudd::AutodynEnable(Cudd_ReorderingType) const’未定义的引用 AGEMA.cpp:(.text+0xb7ff):对‘Cudd::~Cudd()’未定义的引用 ./build/release/AGEMA.o:在函数‘convertCUDD(std::string, std::string, std::string)::{lambda(unsigned long const&)#1}::operator()(unsigned long const&) const [clone .isra.285]’中: AGEMA.cpp:(.text+0xc1c8):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0xc1d0):对‘DD::NodeReadIndex() const’未定义的引用 AGEMA.cpp:(.text+0xc1ed):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0xc206):对‘ABDD::~ABDD()’未定义的引用 ./build/release/AGEMA.o:在函数‘readModelFromInstructions(std::string)’中: AGEMA.cpp:(.text+0x105fe):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x10d67):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x10e3c):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x10e46):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x11162):对‘BDD::BDD()’未定义的引用 AGEMA.cpp:(.text+0x11395):对‘ABDD::~ABDD()’未定义的引用 ./build/release/AGEMA.o:在函数‘convertCUDD(std::string, std::string, std::string)’中: AGEMA.cpp:(.text+0x201c6):对‘defaultError(std::string)’未定义的引用 AGEMA.cpp:(.text+0x201d2):对‘Cudd::Cudd(unsigned int, unsigned int, unsigned int, unsigned int, unsigned long, void ()(std::string))’未定义的引用 AGEMA.cpp:(.text+0x201e5):对‘Cudd::AutodynEnable(Cudd_ReorderingType) const’未定义的引用 AGEMA.cpp:(.text+0x20373):对‘Cudd::bddVar(int) const’未定义的引用 AGEMA.cpp:(.text+0x20394):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x2039e):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x203ab):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x20476):对‘Cudd::AutodynDisable() const’未定义的引用 AGEMA.cpp:(.text+0x20487):对‘Cudd::ReduceHeap(Cudd_ReorderingType, int) const’未定义的引用 AGEMA.cpp:(.text+0x208d2):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x208dc):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2096e):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x2097b):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x20b9d):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x20baa):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x20bb7):对‘Cudd::getManager() const’未定义的引用 AGEMA.cpp:(.text+0x20bd7):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x20d1f):对‘Cudd::addZero() const’未定义的引用 AGEMA.cpp:(.text+0x20d2c):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x20d56):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x20d68):对‘Cudd::addOne() const’未定义的引用 AGEMA.cpp:(.text+0x20d75):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x20d9a):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x210b9):对‘Cudd::bddZero() const’未定义的引用 AGEMA.cpp:(.text+0x210ce):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x210db):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x21122):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2112f):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21141):对‘Cudd::bddOne() const’未定义的引用 AGEMA.cpp:(.text+0x21156):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x21163):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x211b2):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x211bf):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21669):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x21676):对‘DD::NodeReadIndex() const’未定义的引用 AGEMA.cpp:(.text+0x2169d):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x216c5):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x216d2):对‘DD::NodeReadIndex() const’未定义的引用 AGEMA.cpp:(.text+0x216f5):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21714):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21abd):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x21aca):对‘DD::NodeReadIndex() const’未定义的引用 AGEMA.cpp:(.text+0x21af1):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21b1d):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x21b2a):对‘DD::NodeReadIndex() const’未定义的引用 AGEMA.cpp:(.text+0x21b5c):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21b81):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21d2e):对‘BDD::Add() const’未定义的引用 AGEMA.cpp:(.text+0x21d3b):对‘DD::getNode() const’未定义的引用 AGEMA.cpp:(.text+0x21dff):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x21fb3):对‘Cudd::~Cudd()’未定义的引用 AGEMA.cpp:(.text+0x2213e):对‘BDD::operator&(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x22162):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x2216f):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2217c):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x221a2):对‘BDD::operator!() const’未定义的引用 AGEMA.cpp:(.text+0x221c6):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x221d3):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x221e0):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22258):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22293):对‘Cudd::~Cudd()’未定义的引用 AGEMA.cpp:(.text+0x2239c):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2241b):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22430):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22445):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2245a):对‘ABDD::~ABDD()’未定义的引用 ./build/release/AGEMA.o:AGEMA.cpp:(.text+0x2247a): 跟着更多未定义的参考到 ABDD::~ABDD() ./build/release/AGEMA.o:在函数‘convertCUDD(std::string, std::string, std::string)’中: AGEMA.cpp:(.text+0x224f2):对‘Cudd::~Cudd()’未定义的引用 AGEMA.cpp:(.text+0x22592):对‘BDD::operator&(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x225a2):对‘BDD::operator!() const’未定义的引用 AGEMA.cpp:(.text+0x225c6):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x225d3):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x225e0):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x225e8):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2260d):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22617):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22660):对‘BDD::operator|(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x22684):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x22691):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2269e):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x22712):对‘BDD::operator|(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x22722):对‘BDD::operator!() const’未定义的引用 AGEMA.cpp:(.text+0x22746):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x2278b):对‘BDD::operator^(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x227af):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x227bc):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x227c9):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x2281d):对‘BDD::operator^(BDD const&) const’未定义的引用 AGEMA.cpp:(.text+0x2282d):对‘BDD::operator!() const’未定义的引用 AGEMA.cpp:(.text+0x22851):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x228aa):对‘BDD::Ite(BDD const&, BDD const&, unsigned int) const’未定义的引用 AGEMA.cpp:(.text+0x228ce):对‘BDD::operator=(BDD const&)’未定义的引用 AGEMA.cpp:(.text+0x228db):对‘ABDD::~ABDD()’未定义的引用 AGEMA.cpp:(.text+0x228e8):对‘ABDD::~ABDD()’未定义的引用

zzulb commented 3 years ago

Add export LD_LIBRARY_PATH=/*/AGEMA/lib:$LD_LIBRARY_PATH in the bashrc file and it works !