MySQL Forums
Forum List  »  Custom Storage Engines

an error occured when build a custom storage engine
Posted by: sun nheaven
Date: October 09, 2016 04:35AM

Hi!

I want to expand the function of example storage engine.Then i write an extra source code files to define my function such as "indexdef.h" "index.c",and they were used in ha_example.cc and included in ha_example.h. After that i modified the CMakeList.txt to "SET(EXAMPLE_SOURCES index.c ha_fastidx.cc)".but when i build them ,it's occured to be failure,the function defined in my file can't be find:
...
...
[ 72%] Built target base64-t
[ 72%] Built target bitmap-t
[ 72%] Built target gen_lex_hash
[ 72%] Built target GenServerSource
[ 72%] Built target partition
[ 94%] Built target sql
Linking CXX executable explain_filename-t
../../storage/example/libexample.a(ha_example.cc.o): In function `ha_example::create(char const*, TABLE*, st_ha_create_information*)
/home/dbuser/share/sun/mysql-5.5.46/storage/example/ha_example.cc:1102: undefined reference to `aligned_malloc(long)'
/home/dbuser/share/sun/mysql-5.5.46/storage/example/ha_example.cc:1109: undefined reference to `isBigEndian()'
../../storage/example/libexample.a(ha_example.cc.o): In function `ha_example::write_row(unsigned char*)':
/home/dbuser/share/sun/mysql-5.5.46/storage/example/ha_example.cc:460: undefined reference to `atomic_fast_insert(st_fast_keydef*, u
collect2: ld returned 1 exit status
make[2]: *** [unittest/mysys/explain_filename-t] Error 1
make[1]: *** [unittest/mysys/CMakeFiles/explain_filename-t.dir/all] Error 2
make: *** [all] Error 2

how can i solve the problem ?

Options: ReplyQuote


Subject
Views
Written By
Posted
an error occured when build a custom storage engine
1274
October 09, 2016 04:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.