LINUX.ORG.RU

Собираю reopenldap. Разыскивается ac/assert.h.

 , , ,


0

2

Привет ЛОР!

Собираю reopenldap.

Написал для него spec-файл для rpm. Configure проходит нормально, есть строки

checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
Но дальше сборка отваливается, т.к. не найден ac/assert.h. Никаких assert.h в исходниках я не нашёл. Где взять? build.log.

Кусок portable.h:

#include "ac/fdset.h"

#include "ldap_cdefs.h"
#include "ldap_features.h"

#include "ac/assert.h"
#include "ac/localize.h"

#endif /* _LDAP_PORTABLE_H */
/* end of portable.h.post */

ac/localize.h в include есть, а ac/assert.h нет.

Для Ъ:

In file included from entropy.c:22:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'entropy.o' failed
make[2]: *** [entropy.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from base64.c:38:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
In file included from sasl.c:16:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'base64.o' failed
make[2]: *** [base64.o] Error 1
In file included from signal.c:16:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'sasl.o' failed
make[2]: *** [sasl.o] Error 1
<builtin>: recipe for target 'signal.o' failed
make[2]: *** [signal.o] Error 1
In file included from md5.c:46:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
In file included from hash.c:22:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'md5.o' failed
<builtin>: recipe for target 'hash.o' failed
make[2]: *** [md5.o] Error 1
make[2]: *** [hash.o] Error 1
In file included from passfile.c:16:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'passfile.o' failed
make[2]: *** [passfile.o] Error 1
In file included from passwd.c:29:0:
../../include/portable.h:1198:23: fatal error: ac/assert.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'passwd.o' failed
make[2]: *** [passwd.o] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/reopenldap-2.4.41/reopenldap-349e358/libraries/liblutil'
Makefile:296: recipe for target 'all-common' failed
make[1]: Leaving directory '/builddir/build/BUILD/reopenldap-2.4.41/reopenldap-349e358/libraries'
make[1]: *** [all-common] Error 1
Makefile:312: recipe for target 'all-common' failed
make: *** [all-common] Error 1

★★★★★

Добавил в include/ac симлинк на /usr/include/assert.h, жаловаться перестал, но теперь жалуется на неизвестные атрибуты (я так понял они для msvc?):

hipagut.c:39:8: error: unknown type name '__forceinline'
 static __forceinline uint64_t unaligned_load(const volatile void* ptr) {
        ^
hipagut.c:39:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unaligned_load'
 static __forceinline uint64_t unaligned_load(const volatile void* ptr) {
                               ^
hipagut.c:53:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 static __forceinline void unaligned_store(volatile void* ptr, uint64_t value) {
                      ^
hipagut.c:92:8: error: unknown type name '__forceinline'
 static __forceinline uint64_t entropy_ticks() {
        ^
hipagut.c:92:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'entropy_ticks'
 static __forceinline uint64_t entropy_ticks() {
                               ^
hipagut.c:154:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
 static __forceinline unsigned canary() {
                      ^
hipagut.c:159:8: error: unknown type name '__forceinline'
 static __forceinline uint32_t linear_congruential(uint32_t value) {
        ^
hipagut.c:159:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'linear_congruential'
 static __forceinline uint32_t linear_congruential(uint32_t value) {
                               ^
hipagut.c:164:8: error: unknown type name '__forceinline'
 static __forceinline uint32_t mixup(unsigned chirp, const unsigned n42) {
        ^
hipagut.c:164:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mixup'
 static __forceinline uint32_t mixup(unsigned chirp, const unsigned n42) {
                               ^
hipagut.c:182:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
 static __forceinline int fairly(uint32_t value) {
                      ^
hipagut.c:189:1: error: unknown type name '__hot'
 __hot __flatten void lber_hug_setup(lber_hug_t* self, const unsigned n42) {
 ^
hipagut.c:189:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot __flatten void lber_hug_setup(lber_hug_t* self, const unsigned n42) {
                 ^
hipagut.c:209:1: error: unknown type name '__hot'
 __hot __flatten int lber_hug_probe(const lber_hug_t* self, const unsigned n42) {
 ^
hipagut.c:209:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
 __hot __flatten int lber_hug_probe(const lber_hug_t* self, const unsigned n42) {
                 ^
hipagut.c:223:1: error: unknown type name '__hot'
 __hot __flatten void lber_hug_drown(lber_hug_t* gizmo) {
 ^
hipagut.c:223:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot __flatten void lber_hug_drown(lber_hug_t* gizmo) {
                 ^
hipagut.c: In function 'lber_hug_setup_link':
hipagut.c:230:24: warning: implicit declaration of function 'unaligned_load' [-Wimplicit-function-declaration]
  lber_hug_setup(slave, unaligned_load(master->opacue) >> 32);
                        ^
hipagut.c:230:55: warning: right shift count >= width of type [-Wshift-count-overflow]
  lber_hug_setup(slave, unaligned_load(master->opacue) >> 32);
                                                       ^
hipagut.c: In function 'lber_hug_probe_link':
hipagut.c:238:62: warning: right shift count >= width of type [-Wshift-count-overflow]
  return lber_hug_probe(slave, unaligned_load(master->opacue) >> 32);
                                                              ^
hipagut.c: At top level:
hipagut.c:245:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cache_aligned'
 struct _lber_hug_memchk_info lber_hug_memchk_info __cache_aligned;
                                                   ^
hipagut.c:288:1: error: unknown type name '__hot'
 __hot __flatten size_t lber_hug_memchk_size(const void* payload) {
 ^
hipagut.c:288:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'size_t'
 __hot __flatten size_t lber_hug_memchk_size(const void* payload) {
                 ^
hipagut.c:312:1: error: unknown type name '__hot'
 __hot __flatten int lber_hug_memchk_probe(
 ^
hipagut.c:312:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
 __hot __flatten int lber_hug_memchk_probe(
                 ^
hipagut.c:342:1: error: unknown type name '__hot'
 __hot __flatten void lber_hug_memchk_ensure(const void* payload) {
 ^
hipagut.c:342:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot __flatten void lber_hug_memchk_ensure(const void* payload) {
                 ^
hipagut.c:349:1: error: unknown type name '__hot'
 __hot __flatten void* lber_hug_memchk_setup(
 ^

Ivan_qrt ★★★★★
() автор топика
Ответ на: комментарий от Ivan_qrt
hipagut.c:349:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot __flatten void* lber_hug_memchk_setup(
                 ^
hipagut.c:387:1: error: unknown type name '__hot'
 __hot __flatten void* lber_hug_memchk_drown(void* payload) {
 ^
hipagut.c:387:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot __flatten void* lber_hug_memchk_drown(void* payload) {
                 ^
hipagut.c: In function 'lber_hug_memchk_probe_realloc':
hipagut.c:417:6: warning: implicit declaration of function 'likely' [-Wimplicit-function-declaration]
  if (likely(lber_hug_nasty_disabled != LBER_HUG_DISABLED)) {
      ^
hipagut.c:418:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
   if (unlikely(lber_hug_probe(&memchunk->hm_guard_head, key)))
       ^
hipagut.c:429:5: warning: implicit declaration of function 'LDAP_ENSURE' [-Wimplicit-function-declaration]
     LDAP_ENSURE(VALGRIND_CHECK_MEM_IS_ADDRESSABLE(memchunk,
     ^
hipagut.c:429:17: warning: implicit declaration of function 'VALGRIND_CHECK_MEM_IS_ADDRESSABLE' [-Wimplicit-function-declaration]
     LDAP_ENSURE(VALGRIND_CHECK_MEM_IS_ADDRESSABLE(memchunk,
                 ^
hipagut.c: In function 'lber_hug_realloc_begin':
hipagut.c:438:17: warning: implicit declaration of function 'canary' [-Wimplicit-function-declaration]
  unsigned key = canary();
                 ^
hipagut.c:442:4: warning: implicit declaration of function 'VALGRIND_MAKE_MEM_DEFINED' [-Wimplicit-function-declaration]
  VALGRIND_OPEN(memchunk);
    ^
hipagut.c: In function 'lber_hug_realloc_undo':
hipagut.c:465:4: warning: implicit declaration of function 'VALGRIND_MAKE_MEM_NOACCESS' [-Wimplicit-function-declaration]
  VALGRIND_CLOSE(memchunk);
    ^
hipagut.c: In function 'lber_hug_realloc_commit':
hipagut.c:496:3: warning: implicit declaration of function 'VALGRIND_MAKE_MEM_UNDEFINED' [-Wimplicit-function-declaration]
   VALGRIND_MAKE_MEM_UNDEFINED(
   ^
hipagut.c: In function 'reopenldap_flags_init':
hipagut.c:514:12: error: 'REOPENLDAP_FLAG_IDDQD' undeclared (first use in this function)
   flags |= REOPENLDAP_FLAG_IDDQD;
            ^
hipagut.c:514:12: note: each undeclared identifier is reported only once for each function it appears in
hipagut.c:516:12: error: 'REOPENLDAP_FLAG_IDKFA' undeclared (first use in this function)
   flags |= REOPENLDAP_FLAG_IDKFA;
            ^
hipagut.c:518:12: error: 'REOPENLDAP_FLAG_JITTER' undeclared (first use in this function)
   flags |= REOPENLDAP_FLAG_JITTER;
            ^
hipagut.c:519:2: warning: implicit declaration of function 'reopenldap_flags_setup' [-Wimplicit-function-declaration]
  reopenldap_flags_setup(flags);
  ^
hipagut.c: At top level:
hipagut.c:522:6: warning: conflicting types for 'reopenldap_flags_setup'
 void reopenldap_flags_setup(int flags) {
      ^
hipagut.c:519:2: note: previous implicit declaration of 'reopenldap_flags_setup' was here
  reopenldap_flags_setup(flags);
  ^
hipagut.c: In function 'reopenldap_flags_setup':
hipagut.c:523:30: error: 'REOPENLDAP_FLAG_IDDQD' undeclared (first use in this function)
  reopenldap_flags = flags & (REOPENLDAP_FLAG_IDDQD
                              ^
hipagut.c:524:11: error: 'REOPENLDAP_FLAG_IDKFA' undeclared (first use in this function)
         | REOPENLDAP_FLAG_IDKFA
           ^
hipagut.c:525:11: error: 'REOPENLDAP_FLAG_JITTER' undeclared (first use in this function)
         | REOPENLDAP_FLAG_JITTER);
           ^
hipagut.c:528:6: warning: implicit declaration of function 'reopenldap_mode_idkfa' [-Wimplicit-function-declaration]
  if (reopenldap_mode_idkfa()) {
      ^
hipagut.c: At top level:
hipagut.c:544:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot void reopenldap_jitter(int probability_percent) {
       ^
hipagut.c:559:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 __hot void* ber_memcpy_safe(void* dest, const void* src, size_t n) {
       ^
Ivan_qrt ★★★★★
() автор топика
Ответ на: комментарий от Ivan_qrt

Логичней было-бы добавить issue на github, на LOR не каждый день захожу.

По делу:

  • Какую версию пробуете, spec в студию, etc.
  • configure.in устаревший, см. https://github.com/ReOpen/ReOpenLDAP/issues/5
  • Воскрешение ac/assert.h видимо отсюда.
  • Начинайте сборку без перестройки configure, иначе будет плохо.
  • Фильтровать кучу говна в configure.in не планируется, будет либо просто Makefile, либо cmake.

Белого пушистого релиза (с нормальными сценариями сборки) пока нет. Были планы сделать это летом, включая rpm, deb и т.д. Но всплыли баги в репликации, поэтому отложили.

С репликацией всё плохо, см. https://github.com/ReOpen/ReOpenLDAP/issues/43 Но это вершина айсберга, в нужном нам multi-master режиме исходно просто глюкало... понемногу переписываем.

P.S. Потерянные «неизвестные» атрибуты не из видны, они в include/reopenldap.h, см https://github.com/ReOpen/ReOpenLDAP/blob/master/include/reopenldap.h

ly
()
Ответ на: комментарий от ly

Re2: sudo casе ly ;)

Если будут полезные правки - pls не забудьте сделать pull request или хотя-бы намылить.

До Highload++2015 никаких изменений на github не будет. При желании/необходимости пообщаться лично подходите на Highload, http://www.highload.ru/2015/abstracts/1831.html

Всё, пока.

ly
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.