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

Ошибка сборки (error: redefinition of ‘time_amortization_table_fast_exp’) #26

Open
pensnarik opened this issue Sep 19, 2017 · 2 comments

Comments

@pensnarik
Copy link

vv/am-amortization.c:59:8: error: redefinition of ‘time_amortization_table_fast_exp’
 double time_amortization_table_fast_exp (time_amortization_table_t *self, int dt) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vv/am-amortization.c:23:0:
vv/am-amortization.h:42:22: note: previous definition of ‘time_amortization_table_fast_exp’ was here
 extern inline double time_amortization_table_fast_exp (time_amortization_table_t *self, int dt) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:280: recipe for target 'objs/vv/am-amortization.o' failed
make: *** [objs/vv/am-amortization.o] Error 1
make: *** Waiting for unfinished jobs....

Если закомментировать одно из объявлений, получаю ошибку на этапе линковки:

objs/vv/am-amortization.o: In function `time_amortization_table_fast_exp':
/home/mutex/src/kphp-kdb/vv/am-amortization.h:44: multiple definition of `time_amortization_table_fast_exp'
objs/targ/targ-weights.o:/home/mutex/src/kphp-kdb/vv/am-amortization.h:44: first defined here
collect2: error: ld returned 1 exit status
Makefile:329: recipe for target 'objs/bin/targ-engine' failed
make: *** [objs/bin/targ-engine] Error 1
make: *** Waiting for unfinished jobs....
[mutex@hp kphp-kdb]$ (master)*$ mc
@ximik777
Copy link

Собирайтесь через gcc <= 4.9

@pensnarik
Copy link
Author

Попробовал 4.8 и 4.9, столкнулся с другой проблемой (make kphp):

In file included from KPHP/runtime/regexp.cpp:29:0:
/usr/include/re2/re2.h:734:16: error: ‘once_flag’ in namespace ‘std’ does not name a type
   mutable std::once_flag rprog_once_;
                ^

А если передавать флаг -std=c++11, тогда:

KPHP/runtime/drivers.h:567:30: error: expected ‘;’ before ‘it’
   for (typeof (keys.begin()) it = keys.begin(); it != keys.end(); ++it) {
                              ^

И много других подобных ошибок.

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