To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=81303
                 Issue #|81303
                 Summary|berkeleydb's configure tries to detect java-include di
                        |r but fails (and obsoleted already by issue 66252)
               Component|porting
                 Version|680m226
                Platform|Opteron/x86_64
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|mh
             Reported by|cloph





------- Additional comments from [EMAIL PROTECTED] Wed Sep  5 21:47:53 +0000 
2007 -------
on x86_64 (Fedora 7.90/Rawhide) with gij

Building berkeleydb fails because berkeleydb's own configure detects a wrong
path for java-includes which results in compile-time errors of the configure 
checks.
(check for off_t fails)

If you're only interested in the solution, jump to the ############ delimiter

build prints:
[...]
checking size of char *... 0
checking for off_t... no
configure: error: No off_t type.
dmake:  Error code 1, while making
'unxlngx6.pro/misc/build/so_configured_so_berkeleydb'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making /home/cloph/compile/shadow/berkeleydb

unxlngx6.pro/misc/build/db-4.2.52.NC/out/config.log contains:
configure:25928: checking for off_t
configure:25954: gcc -c -fno-strict-aliasing
-I/usr/lib/jvm/java-1.5.0-gcj/include -O2  -D_GNU_SOURCE -D_REENTRANT
-I/usr/lib/jvm/java-1.5.0-gcj/bin/../../../../include/linux conftest.c >&5
In file included from /usr/include/sys/types.h:134,
                 from configure:25970:
/usr/lib/jvm/java-1.5.0-gcj/bin/../../../../include/linux/time.h:10: error:
expected specifier-qualifier-list before 'time_t'
/usr/lib/jvm/java-1.5.0-gcj/bin/../../../../include/linux/time.h:16: error:
expected specifier-qualifier-list before 'time_t'
In file included from /usr/include/sys/select.h:47,
                 from /usr/include/sys/types.h:221,
                 from configure:25970:
/usr/include/bits/time.h:70: error: redefinition of 'struct timeval'
In file included from /usr/include/stdio.h:76,
                 from configure:25972:
/usr/include/libio.h:329: error: expected specifier-qualifier-list before 
'size_t'
[some more errors snipped]

The problem is caused by the wrong include path that is added by configure
(-I/usr/lib/jvm/java-1.5.0-gcj/bin/../../../../include/linux)

issue 66252 already added the correct includepath via the makefile.mk:

.IF "$(SOLAR_JAVA)"!=""
CONFIGURE_FLAGS+=--enable-java
ARCH_FLAGS+=-I$(JAVA_HOME)/include
.ENDIF
# just pass ARCH_FLAGS to native build
CFLAGS+:=$(ARCH_FLAGS)
CXXFLAGS+:=$(ARCH_FLAGS)
.EXPORT : CFLAGS CXXFLAGS

Disabling the addition done by configure allows the build to complete - and
since the path is already added via the makefile, it shouldn't cause any
problems (but as it is with java stuff and distributions scatter files all over
the place and maybe not all versions of gij are equal) - so it probably should
be tested with a couple of versions to make sure that no other JDK relies on the
autodetection.

#######################
#######################
I'll attach an updated patch that was created by dmake patch / dmake
create_patch (that was afterwards modified to match the order of files as in the
original patch. But since diffs for diffs are hard to read, here's the relevant
part of the patch alone:

*** misc/db-4.2.52.NC/dist/configure    Wed Dec  3 22:10:02 2003
--- misc/build/db-4.2.52.NC/dist/configure      Wed Sep  5 22:12:50 2007
[already existing patch-hunks stripped]
***************
*** 20912,20921 ****
     { (exit 1); exit 1; }; } ;;
        esac

!       for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
!       do
!               CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
!       done

        ADDITIONAL_LANG="$ADDITIONAL_LANG java"
        INSTALL_LIBS="$INSTALL_LIBS \$(libjso_target)"
--- 20925,20934 ----
     { (exit 1); exit 1; }; } ;;
        esac

! #     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
! #     do
! #             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
! #     done

        ADDITIONAL_LANG="$ADDITIONAL_LANG java"
        INSTALL_LIBS="$INSTALL_LIBS \$(libjso_target)"

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to