Bug #39080 Compile errors in Cluster: LockQueue.hpp + PosixAsyncFile.cpp + more
Submitted: 27 Aug 2008 19:15 Modified: 6 May 2009 9:04
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql-5.1-telco-6.3 -> 6.3.17 Cluster OS:Other (See text)
Assigned to: jack andrews CPU Architecture:Any

[27 Aug 2008 19:15] Joerg Bruehe
Description:
With the fixes for bugs 39036 and 39038 applied,
the build proceeds to the next problems on Solaris 9 and HP-UX 11.23:

=====

Solaris 9:
CC -DHAVE_CONFIG_H    -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/mgmapi -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -I../../../../../zlib    -instances=static   -g  -DSAFE_MUTEX -g  -noex -mt -D_FORTEC_ -xarch=v9   -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -c -o LockQueue.o LockQueue.cpp

"LockQueue.hpp", line 42: Error: Illegal syntax for elaborated type specifier   .

=====

HP-UX 11.23:
aCC -DHAVE_CONFIG_H -DNDEBUG   -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/kernel/blocks/dblqh -I../../../../../zlib -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -I../../../../../zlib      +O2 -g +O2 +DD64 +DSitanium2 -mt -DPTHREAD_COMPAT_MODE -O1 -Aa   -DHPUX11  -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -c -o PosixAsyncFile.o `test -f 'ndbfs/PosixAsyncFile.cpp' || echo './'`ndbfs/PosixAsyncFile.cpp

"ndbfs/PosixAsyncFile.cpp", line 458: error #2101: "seek_val" has already been declared in the current scope
    off_t seek_val;
          ^

"ndbfs/PosixAsyncFile.cpp", line 530: error #2265-D: function "AsyncFile::readReq" is inaccessible
    readReq(request);
    ^

2 errors detected in the compilation of "ndbfs/PosixAsyncFile.cpp".

=====

In addition, there are *many* warnings that
   "types cannot be declared in anonymous unions"
most of them referring to "storage/ndb/include/mgmapi/ndb_logevent.h".

How to repeat:
Build on Solaris 9 and HP-UX 11.23
[28 Aug 2008 7:09] Joerg Bruehe
I have run "make -k" twice on the affected hosts, the logs are saved.

Log file names etc. are added in a private entry.
[1 Sep 2008 18:40] Joerg Bruehe
I applied the patch provided from development:
- Solaris 9 now built on Sparc-64bit and on 386,
- but it still failed on Sparc-32bit;
- HP-UX failed again.

In detail:

==== HP-UX 11.23 ====

"ndbfs/PosixAsyncFile.cpp", line 458: error #2101: "seek_val" has already been declared in the current scope
    off_t seek_val;
          ^

1 error detected in the compilation of "ndbfs/PosixAsyncFile.cpp".

Checking the source, it is obvious there is an error:
    441 int PosixAsyncFile::readBuffer(Request *req, char *buf,
    442                                size_t size, off_t offset)
    443 {
    444   int return_value;
    445   req->par.readWrite.pages[0].size = 0;
    446 #if ! defined(HAVE_PREAD)
    447   off_t seek_val;
    448   if(!use_gz)
    449   {
    450     while((seek_val= lseek(theFd, offset, SEEK_SET)) == (off_t)-1
    451           && errno == EINTR);
    452     if(seek_val == (off_t)-1)
    453     {
    454       return errno;
    455     }
    456   }
    457 #endif
    458   off_t seek_val;
    459   if(use_gz)
    460   {
    461     while((seek_val= azseek(&azf, offset, SEEK_SET)) == (off_t)-1
    462           && errno == EINTR);
    463     if(seek_val == (off_t)-1)
    464     {
    465       return errno;
    466     }
    467   }
    468

I suspect lines 458 .. 467 should be the "#else" block of the "#if" in line 446, but didn't yet try that.

==== Solaris 9, Sparc (32 bit) ====

The linker fails on an input library without reporting any details,
to me it seems to be an internal error:

CC -g -DSAFE_MUTEX -g -noex -mt -D_FORTEC_ -xarch=v8 -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -xarch=v8 -o gen_lex_hash gen_lex_hash.o  ../vio/libvio.a ../mysys/.libs/libmysyswrap.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../mysys/.libs/libmysyslt.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../dbug/.libs/libdbuglt.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../regex/libregex.a ../strings/.libs/libmystringsextra.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../strings/.libs/libmystringslt.a -lpthread -lthread -lpthread -lthread -lpthread -lthread -lpthread -lthread ../zlib/.libs/libzlt.a -lrt -lpthread -lthread -lposix4 -lresolv -lgen -lsocket -lmtmalloc -lnsl -lm -lpthread -lthread
ld: elf error: file ../mysys/.libs/libmysyswrap.a: elf_getarsym
ld: fatal: File processing errors. No output written to gen_lex_hash
gmake[2]: *** [gen_lex_hash] Error 1

I cannot spot any significant difference to the platforms where it works.
[9 Jan 2009 18:47] Magnus BlÄudd
Most likely the "off_t seek_val" variable should simply be moved to begininig of function.
[15 Apr 2009 10:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/72119

2937 jack andrews	2009-04-15
      bug#39080  Compile errors in Cluster: LockQueue.hpp + PosixAsyncFile.cpp + more
[16 Apr 2009 16:53] Jon Stephens
Hi Jack,

I can't document a bugfix without knowing which versions the fix went into.

The bug report should be updated with this info + set into Documenting status automatically when your pushes are merged to production trees. If this isn't happening for your pushes, please check with one of the other devs (I suggest Jonas or Magnus) to get help in figuring out why.

Thanks!
[29 Apr 2009 10:13] jack andrews
this is fixed in 6.3 and 7.0
[29 Apr 2009 11:37] Bugs System
Pushed into 5.1.32-ndb-6.3.25 (revid:jack@sun.com-20090429081724-ny49e0kw3y6xpjkw) (version source revid:jack@sun.com-20090415102342-n4p58kxi1skfhqgd) (merge vers: 5.1.32-ndb-6.3.25) (pib:6)
[30 Apr 2009 8:51] Bugs System
Pushed into 5.1.32-ndb-7.0.6 (revid:ole.john.aske@sun.com-20090430084504-2c8iheeuc631njs5) (version source revid:ole.john.aske@sun.com-20090430084504-2c8iheeuc631njs5) (merge vers: 5.1.32-ndb-7.0.6) (pib:6)
[6 May 2009 9:04] Jon Stephens
Documented bugfix in the NDB-6.3.25 and 7.0.6 changelogs as follows:

        NDBCLUSTER did not build correctly on Solaris 9 platforms.

Closed.