Closed dnbaker closed 8 years ago
Hi, first of all thank you for your interest.
I am looking into the issues you uncovered, the tsxdefinitions.h apparently had an error, causing it to fail during compilation. I have fixed this one issue.
The second problem seems to be a Linker issue. To fix this it would be really helpful to know more about your projects structure. On first glance it looks like the hash table is included within multiple compile units. Apparently there is some problem with then linking them into a single file. Can you give me an intuition, how db.cpp and mapmake.cpp interact in your project architecture?
Greetings Tobias
Hi Tobias! Thanks for the help.
db.h was actually almost empty, and db.cpp had nothing but namespace kpg {}:
#ifndef __DB_H__
#define __DB_H__
#include "feature_min.h"
#include "encoder.h"
#include "data-structures/tsxdefinitions.h"
namespace kpg {
}
#endif // #ifdef __DB_H__
mapmake.cpp was the only file that included db.h except for db.cpp, which was causing the problems, as I was linking the two together. I found that by removing db.o, I was able to get it to compile.
It would be nice to be able to be able to have functions working with them in multiple input files, though that seems to be only be an issue for the non-template classes. I was considering using them for the core for the core of a database for a classification project. I think that could be solved by templating the non-template classes, declaring their functions as inline, or by providing implementations in matched .cpp files. I expect many projects would want to share the declarations between multiple files without sharing the implementations.
Either way, thanks for the quick response, and best of luck!
You were right apparently, I missed marking the functions in SimpleElement with inline. I hope everything works now.
It compiles just fine now. Thank you!
When I ran into your manuscript on arxiv, I was quite excited by your results and wanted to try your tables, but I am unable to build any files including either
definitions.h
ortsxdefinitions.h
. The only difference between this and a branch of our project which is building as expected is the include line. tsxdefinitions seems to die much sooner.It outputs:
From definitions.h, I get the following errors:
Now, the tsx might die sooner because I may not have transactional memory on these Xeon R processors. This is with gcc6.2.1 on RedHat.
Edit: Adding -latomic and -lgcc_s and -lgcc seem to have eliminated the undefineed __sync_bool_compare_and_swap_16s, but I still am encountering the multiple definitions. Maybe a
static
declaration is needed?Any idea why that might be?
Thanks!