 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
| |
< < | How to build JDBC and RMI optional packages for MR2 | > > | How to Build JDBC and RMI Optional Packages | | | | |
< < | The JDBC and RMI optional packages where designed to be overlayed on top of the CDC source tree, and then built using OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out CDC from the svn repository. Having the overlay just clutters the CDC source directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from separate component directories rather than as overlays. | > > | The JDBC and RMI optional packages were originally designed to be overlayed on top of the CDC source tree, and then built using OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out CDC from the svn repository. Having the overlay just clutters the CDC source directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from separate component directories rather than as overlays. | | | |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | |
< < | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from seperate component directories rather than as overlays. | > > | The JDBC and RMI optional packages where designed to be overlayed on top of the CDC source tree, and then built using OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out CDC from the svn repository. Having the overlay just clutters the CDC source directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from separate component directories rather than as overlays. | | | | | | make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| |
< < | 5. Note there is no support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | > > | 5. Note there is no support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the phoneME source tree. | | | Building RMI | | | make J2ME_CLASSLIB=foundation USE_RMI=true RMI_DIR=$RMI_DIR
| |
< < | 5. Note there is no support for including $RMI_DIR/build/share/rules_rmi_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | > > | 5. Note there is no support for including $RMI_DIR/build/share/rules_rmi_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the phoneME source tree. | | | -- ChrisPlummer - 24 May 2007 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | | | mv /tmp/jdbc_cdc1.0/cdcfoundation/ $COMPONENTS_DIR/jdbc
| |
< < | 3. Add the following to the end of cdc/build/share/defs_op.mk: | > > | 3. Add the following to the end of cdc/build/share/defs_op.mk (NOTE: as of revision 5980, the following is already in defs_op.mk, and does not need to be added): | | |
# Include JDBC
| | | make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| |
< < | 5. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | > > | 5. Note there is no support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | | | Building RMI | | | mv /tmp/rmi $COMPONENTS_DIR/rmi
| |
< < | 3. Add the following to the end of cdc/build/share/defs_op.mk: | > > | 3. Add the following to the end of cdc/build/share/defs_op.mk (NOTE: as of revision 5980, the following is already in defs_op.mk, and does not need to be added): | | |
# Include RMI
| | | make J2ME_CLASSLIB=foundation USE_RMI=true RMI_DIR=$RMI_DIR
| |
< < | 5. Note I didn't add any support for including $RMI_DIR/build/share/rules_rmi_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | > > | 5. Note there is no support for including $RMI_DIR/build/share/rules_rmi_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | | | -- ChrisPlummer - 24 May 2007 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | |
< < | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from seperate component directory rather than as overlays. | > > | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from seperate component directories rather than as overlays. | | | | | | 1. Get the JDBC sources from here. | |
< < | 2. unzip the JDBC sources. The root of the JDBC component will be named /jdbc_cdc1.0/cdcfoundation. The path to the directory will be set on the make command line using the JDBC_DIR variable. If you want to avoid the need to set JDBC_DIR, then copy this directory to one named jdbc that is located in the same directory as the cdc component. | > > | 2. unzip the JDBC sources. The root of the JDBC component will be named <dir>/jdbc_cdc1.0/cdcfoundation. The path to the directory will be set on the make command line using the JDBC_DIR variable. If you want to avoid the need to set JDBC_DIR, then copy this directory to one named jdbc that is located in the same directory as the cdc component. | | |
mv /tmp/jdbc_cdc1.0/cdcfoundation/ $COMPONENTS_DIR/jdbc
| | |
# Include JDBC
ifeq ($(USE_JDBC), true)
| |
> > | ifeq ($(J2ME_CLASSLIB),cdc)
$(error USE_JDBC=true requries at least J2ME_CLASSLIB=foundation)
endif | | | export JDBC_DIR ?= $(COMPONENTS_DIR)/jdbc
JDBC_DEFS_FILE = $(JDBC_DIR)/build/share/defs_jdbc_pkg.mk
ifeq ($(wildcard $(JDBC_DEFS_FILE)),) | | | 1. Get the RMI sources from here. | |
< < | 2. unzip the RMI sources. Unlike JDBC, the sources to not unzip into a subdirectory, so you'll probably want to do the following: | > > | 2. unzip the RMI sources. Unlike JDBC, the sources do not unzip into a subdirectory, so you'll probably want to do the following: | | |
mkdir rmi
| | | unzip rmiop-1_0-src.zip
| |
< < | If you do the above, root of the RMI component will be named /rmi. The path to the directory will be set on the make command line using the RMI_DIR variable. If you want to avoid the need to set RMI_DIR, then copy this directory to one named rmi that is located in the same directory as the cdc component. | > > | If you do the above, the root of the RMI component will be named <dir>/rmi. The path to the directory will be set on the make command line using the RMI_DIR variable. If you want to avoid the need to set RMI_DIR, then copy this directory to one named rmi that is located in the same directory as the cdc component. | | |
mv /tmp/rmi $COMPONENTS_DIR/rmi
| | |
# Include RMI
ifeq ($(USE_RMI), true)
| |
> > | ifeq ($(J2ME_CLASSLIB),cdc)
$(error USE_RMI=true requries at least J2ME_CLASSLIB=foundation)
endif | | | export RMI_DIR ?= $(COMPONENTS_DIR)/rmi
RMI_DEFS_FILE = $(RMI_DIR)/build/share/defs_rmi_pkg.mk
ifeq ($(wildcard $(RMI_DEFS_FILE)),) |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | |
< < | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC as a seperate component directory rather than as an overlay. A similar approach should work with RMI. | > > | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC and RMI from seperate component directory rather than as overlays.
Building JDBC | | | 1. Get the JDBC sources from here. | |
< < | 2. unzip the JDBC sources. The root of the JDBC component will be named jdbc_cdc1.0/cdcfoundation/. The path to the directory will be set on the make command line using the JDBC_DIR variable. If you want to avoid the need to set JDBC_DIR, then copy this directory to one named jdbc that is located in the same directory as the cdc component. | > > | 2. unzip the JDBC sources. The root of the JDBC component will be named /jdbc_cdc1.0/cdcfoundation. The path to the directory will be set on the make command line using the JDBC_DIR variable. If you want to avoid the need to set JDBC_DIR, then copy this directory to one named jdbc that is located in the same directory as the cdc component. | | |
mv /tmp/jdbc_cdc1.0/cdcfoundation/ $COMPONENTS_DIR/jdbc
| |
< < | 3. In $JDBC_DIR/build/share/defs_jdbc_pkg.mk, replace the setting of JDBC_PACKAGE_SRCPATH with the following:
JDBC_PACKAGE_SRCPATH = \
$(JDBC_DIR)/src/share/jdbc/classes
4. Add the following to the end of cdc/build/share/defs_op.mk: | > > | 3. Add the following to the end of cdc/build/share/defs_op.mk: | | |
# Include JDBC
| | | ifeq ($(wildcard $(JDBC_DEFS_FILE)),)
$(error JDBC_DIR must point to a directory containing JDBC sources: $(JDBC_DIR))
endif | |
> > | # fixup JDBC_PACKAGE_SRCPATH
JDBC_PACKAGE_SRCPATH = $(JDBC_DIR)/src/share/jdbc/classes | | | include $(JDBC_DEFS_FILE)
endif
| |
< < | 5. Now you can build with the following command: | > > | 4. Now you can build with the following command: | | |
make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| |
< < | 6. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | > > | 5. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources.
Building RMI
1. Get the RMI sources from here.
2. unzip the RMI sources. Unlike JDBC, the sources to not unzip into a subdirectory, so you'll probably want to do the following:
mkdir rmi
mv rmiop-1_0-src.zip rmi
cd rmi
unzip rmiop-1_0-src.zip
If you do the above, root of the RMI component will be named /rmi. The path to the directory will be set on the make command line using the RMI_DIR variable. If you want to avoid the need to set RMI_DIR, then copy this directory to one named rmi that is located in the same directory as the cdc component.
mv /tmp/rmi $COMPONENTS_DIR/rmi
3. Add the following to the end of cdc/build/share/defs_op.mk:
# Include RMI
ifeq ($(USE_RMI), true)
export RMI_DIR ?= $(COMPONENTS_DIR)/rmi
RMI_DEFS_FILE = $(RMI_DIR)/build/share/defs_rmi_pkg.mk
ifeq ($(wildcard $(RMI_DEFS_FILE)),)
$(error RMI_DIR must point to a directory containing RMI sources: $(RMI_DIR))
endif
include $(RMI_DEFS_FILE)
# fixup RMI_SRCDIR
RMI_SRCDIR = $(RMI_DIR)/src/share/rmi/classes
endif
4. Now you can build with the following command:
make J2ME_CLASSLIB=foundation USE_RMI=true RMI_DIR=$RMI_DIR
5. Note I didn't add any support for including $RMI_DIR/build/share/rules_rmi_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | | | -- ChrisPlummer - 24 May 2007 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | | | make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| |
< < | 6. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and this is not longer supported from the MR2 sources. | > > | 6. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and building javadocs is no longer supported from the MR2 sources. | | | -- ChrisPlummer - 24 May 2007 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | | | make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| |
> > | 6. Note I didn't add any support for including $JDBC_DIR/build/share/rules_jdbc_pkg.mk. It is only needed for producing javadocs, and this is not longer supported from the MR2 sources. | | | -- ChrisPlummer - 24 May 2007 |
| |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2 | |
< < | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC as a seperate componet directory rather than as an overlay. A similar approach should work with RMI. | > > | The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC as a seperate component directory rather than as an overlay. A similar approach should work with RMI. | | | | |
< < | | > > | 1. Get the JDBC sources from here. | | | | |
< < | Strict aliasing compilers and fdlibm | > > | 2. unzip the JDBC sources. The root of the JDBC component will be named jdbc_cdc1.0/cdcfoundation/. The path to the directory will be set on the make command line using the JDBC_DIR variable. If you want to avoid the need to set JDBC_DIR, then copy this directory to one named jdbc that is located in the same directory as the cdc component. | | | | |
< < | In the past there have been many strict aliasing problems in the fdlibm source found in the cdc/src/share/native/java/lang/fdlibm/ directory. These bugs result in wrong results in java.loang.Math and java.lang.StrictMath. Each time they are fixed, the next major release of gcc seems to uncover more problems. For this reason, it is recommened to always compile fdlibm with gcc strict aliasing disable. This can be accomplished with the following line in your GNUmakefile: | > > |
mv /tmp/jdbc_cdc1.0/cdcfoundation/ $COMPONENTS_DIR/jdbc
| | | | |
> > | 3. In $JDBC_DIR/build/share/defs_jdbc_pkg.mk, replace the setting of JDBC_PACKAGE_SRCPATH with the following: | | |
| |
< < | CC_ARCH_FLAGS_FDLIB += -fno-strict-aliasing | > > | JDBC_PACKAGE_SRCPATH = $(JDBC_DIR)/src/share/jdbc/classes | | | | |
< < | Strict aliasing has also been a repeated thorn in the side of other CDC source, so as of MR1 and MR2, -fno-strict-aliasing has been made the default for all gcc compiled source on all platforms, making the above setting for CC_ARCH_FLAGS_FDLIB unecessary. If you are using an older version of CDC, you may want to add -fno-strict-aliasing to either
CC_ARCH_FLAGS_FDLIB or CC_ARCH_FLAGS | > > | 4. Add the following to the end of cdc/build/share/defs_op.mk: | | | | |
> > |
# Include JDBC
ifeq ($(USE_JDBC), true)
export JDBC_DIR ?= $(COMPONENTS_DIR)/jdbc
JDBC_DEFS_FILE = $(JDBC_DIR)/build/share/defs_jdbc_pkg.mk
ifeq ($(wildcard $(JDBC_DEFS_FILE)),)
$(error JDBC_DIR must point to a directory containing JDBC sources: $(JDBC_DIR))
endif
include $(JDBC_DEFS_FILE)
endif
| | | | |
> > | 5. Now you can build with the following command:
make J2ME_CLASSLIB=foundation USE_JDBC=true JDBC_DIR=$JDBC_DIR
| | | -- ChrisPlummer - 24 May 2007 |
|
> > |
| META TOPICPARENT | name="PhoneMEAdvanced" |
How to build JDBC and RMI optional packages for MR2
The JDBC and RMI optional packages where designed to be overlayed on top of the cdc source tree, and then built uisng OPT_PKGS=jdbc,rmi. While this mechanism (probably) still works, it is not very desirable when checking out cdc from the svn repository. Having the overlay just clutters the cdc directory with source files not under svn control. The following instructions can be used for building JDBC as a seperate componet directory rather than as an overlay. A similar approach should work with RMI.
Strict aliasing compilers and fdlibm
In the past there have been many strict aliasing problems in the fdlibm source found in the cdc/src/share/native/java/lang/fdlibm/ directory. These bugs result in wrong results in java.loang.Math and java.lang.StrictMath. Each time they are fixed, the next major release of gcc seems to uncover more problems. For this reason, it is recommened to always compile fdlibm with gcc strict aliasing disable. This can be accomplished with the following line in your GNUmakefile:
CC_ARCH_FLAGS_FDLIB += -fno-strict-aliasing
Strict aliasing has also been a repeated thorn in the side of other CDC source, so as of MR1 and MR2, -fno-strict-aliasing has been made the default for all gcc compiled source on all platforms, making the above setting for CC_ARCH_FLAGS_FDLIB unecessary. If you are using an older version of CDC, you may want to add -fno-strict-aliasing to either
CC_ARCH_FLAGS_FDLIB or CC_ARCH_FLAGS
-- ChrisPlummer - 24 May 2007 |
|