Skip to main content

Help!java_net_DatagramPacket.h: No such file or directory!!!

6 replies [Last post]
grachel1986
Offline
Joined: 2008-02-28
Points: 0

Hi,all!
I'm a totally freshman to phoneME Advanced MR2,and when I'm compiling the phoneME Advanced MR2 in linux-arm-generic,I run into the problem as follows:
../../src/share/native/java/net/DatagramPacket.c:28:37: java_net_DatagramPacket.h: No such file or directory
I find the "java_net_DatagramPacket.h" file in the "generated" directory in previous files,but I can't find this file now,so I doubt that I have got one macro missing,but I can't figure out which macro to be added to or removed from the GNUmakefile.can anyone give me some advice?Thank you in advance!

PS:my English is a little poor,have I made myself clear?

Message was edited by: grachel1986

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cjplummer
Offline
Joined: 2006-10-16
Points: 0

This problem sometimes happens if a build failed, and then you restart the build. Try doing a "make clean" and then do your build again.

Chris

grachel1986
Offline
Joined: 2008-02-28
Points: 0

Thanks, cjplummer
I have tried so many times already,but it still doesn't work!There is no "java_net_DatagramPacket.h" file at all.Now I just want to know which macro controls whether to generate "java_net_DatagramPacket.h",I know it should be in the directory "generated/jni",any suggestions?

Message was edited by: grachel1986

cjplummer
Offline
Joined: 2006-10-16
Points: 0

generated/jni/java_net_DatagramPacket.h is suppose to be created during the build. After doing a "make clean", can you do an "ls" followed by your make command. Please post the output of the "ls" and the build log (including the build command).

thanks,

Chris

grachel1986
Offline
Joined: 2008-02-28
Points: 0

Thanks,Chris,but I'm building with eclipse under Windows environment,so I can't give what you want.But I can give you the GNUmakefile as follows:
ASM_ARCH_FLAGS =
CC_ARCH_FLAGS =
CC_ARCH_FLAGS_FDLIB =
CC_ARCH_FLAGS_LOOP =
LINK_ARCH_FLAGS =
LINK_ARCH_LIBS =
USE_GCC2 ?= false
USE_AAPCS ?= false
CVM_JIT ?= true
CVM_TARGET_TOOLS_PREFIX = arm-elf-
CVM_INCLUDE_DIRS += D:/phoneme_advanced/eclipse/eclipse/workspace/target/david_install/include
CVM_DISABLE_COMPILER_CHECK = true
J2ME_CLASSLIB = foundation
CVM_DEFINES += -DCVM_USE_MMAP_APIS=0 -DHAVE_MMAP=0
include ../share/top.mk

Wish it can help!

grachel

Message was edited by: grachel1986

cjplummer
Offline
Joined: 2006-10-16
Points: 0

> Thanks,Chris,but I'm building with eclipse under
> Windows environment,so I can't give what you want.

I don't think this has ever been done before. You should really be doing linux/ARM builds on a linux host if you can. Also, it will probably be very hard to help you through this if you can't find a way to copy-n-paste the build log.

Is there anything in the generated/jni directory? You should see about 450 header files there. Note that these are all created during the build.

My guess is that the javah tool is not working for you. Maybe you are using an incompatible version, like one provide by eclipse rather than J2SE. Try setting JDK_HOME to the path to your J2SE 1.4.2 installation. Then look in the build log to make sure that the setting for CVM_JAVA and CVM_JAVAH looks correct. You might also want to try CVM_PRELOAD_LIB=true, which removes the need to even run javah.

>But I can give you the GNUmakefile as follows:

There are a few problems below, but none are related to your java_net_DatagramPacket.h problem.

> ASM_ARCH_FLAGS =
> CC_ARCH_FLAGS =
> CC_ARCH_FLAGS_FDLIB =
> CC_ARCH_FLAGS_LOOP =
> LINK_ARCH_FLAGS =
> LINK_ARCH_LIBS =
> USE_GCC2 ?= false
> USE_AAPCS ?= false
You may need to set this true. It depends on your platform. Once you get things to build, build with CVM_DEBUG=true, and you will get an error message at runtime if this is not set properly.

> CVM_JIT ?= true
> CVM_TARGET_TOOLS_PREFIX = arm-elf-
Look in your build log for the TARGET_CC setting. If the build log is showing an error for it rather than a valid path, then you don't have CVM_TARGET_TOOLS_PREFIX set properly.

> CVM_INCLUDE_DIRS +=
> D:/phoneme_advanced/eclipse/eclipse/workspace/target/d
> avid_install/include
Why is this here? I suspect it will cause you problems.

> CVM_DISABLE_COMPILER_CHECK = true
If you need to set this true, then you probably have a problem with CVM_TARGET_TOOLS_PREFIX.

> J2ME_CLASSLIB = foundation
> CVM_DEFINES += -DCVM_USE_MMAP_APIS=0 -DHAVE_MMAP=0
Why are these here? This are not defines that users should be setting. They will probably cause problems for you.

> include ../share/top.mk
>
> Wish it can help!
>
> grachel
>
> Message was edited by: grachel1986

Chris

grachel1986
Offline
Joined: 2008-02-28
Points: 0

Chris,Thanks so much for all your effort! I really appreciate your help.Now the problem has been settled,and it's really the macros that causes all the problems.Thanks again!