Skip to content

Latest commit

 

History

History
120 lines (58 loc) · 3.94 KB

1.38 如何编译Vdbench适配其他平台.md

File metadata and controls

120 lines (58 loc) · 3.94 KB

Vdbench distributions usually come at a minimum with shared libraries compiled for:

  • Windows

  • Solaris, both Sparc and X86

  • Linux, x86

Vdbench 发行版通常至少包含为以下系统编译的共享库:

  • Windows
  • Solaris,包括 Sparc 和 X86
  • Linux,x86

I don't have access to other platforms, for those you'll have to do your own compile and link. Download the source from the Vdbench Forum, in there you’ll find directory /Jni/.

Note that there is no need whatsoever to recompile Java code!

In this /Jni directory you will find numerous make.xxx scripts that are used or have been used for platform compiles.

You will need a java 1.7 or higher #include directory for the C compile.

Make modifications needed and make sure and that sometimes is the hard part, that all compile and link parameters are defined properly.

Outside of Windows and Solaris you will likely see loads of compiler warning messages. Those are almost always related to small typecast differences between the platforms.

I have only tried to keep both Windows and Solaris clean.

All other platform: just ignore those warnings; I never have seen any real problems.

Sometimes I get error messages of some #defines or typecast statements being done more than once, typically that shows up in vdbjni.h

Just make any change necessary.

As far as I understand this is mainly caused by a target OS having made some small changes to their own include files.

我无法访问其他平台,对于那些平台,您将需要自行编译和链接。您可以从 Vdbench 论坛下载源代码,在那里您将找到 /Jni/ 目录。

请注意,绝对不需要重新编译 Java 代码!

/Jni 目录中,您将找到许多用于平台编译的 make.xxx 脚本。

您将需要一个 Java 1.7 或更高版本的 #include 目录进行 C 编译。

进行必要的修改,并确保(有时这是最困难的部分)所有编译和链接参数都被正确定义。

除了 Windows 和 Solaris 外,您可能会看到大量编译警告消息。这些几乎总是与平台之间的小型类型转换差异有关。

我只尝试过保持 Windows 和 Solaris 干净。

所有其他平台:只需忽略这些警告;我从未遇到过任何真正的问题。

有时我会收到一些关于某些 #defines 或类型转换语句被多次执行的错误消息,通常会显示在 vdbjni.h 中。

只需进行任何必要的更改。

据我了解,这主要是由于目标操作系统对其自己的包含文件进行了一些小的更改所致。

These are the platforms that have ever successfully been using Vdbench:

  • Windows

  • Solaris x86 and Sparc

  • Linux x86 and Sparc

  • OSX

  • HP/UX

  • AIX

  • RaspberryPi

  • ZLinux

  • Power PC linux

这些是曾经成功使用 Vdbench 的平台:

  • Windows
  • Solaris x86 和 Sparc
  • Linux x86 和 Sparc
  • OSX
  • HP/UX
  • AIX
  • RaspberryPi
  • ZLinux
  • Power PC linux

Java source file Vdb/common.java, method common.get_shared_lib() translates the information it gets from java to decide what platform it is running on and then will load the proper shared library file.

If you have a new/weird platform to add, make your change there if needed.

Just run ./vdbench -t, and file output/logfile.html will show you the data Vdbench uses for this translation.

Once the compile is done, simply running ./vdbench -t should be all you need to verify that everything works.

Java 源文件 Vdb/common.java 中的 common.get_shared_lib() 方法将根据从 Java 获取的信息确定运行的平台,然后加载适当的共享库文件。

如果要添加新的或奇怪的平台,请在必要时进行更改。

只需运行 ./vdbench -t,文件 output/logfile.html 将显示 Vdbench 用于此转换的数据。

完成编译后,只需运行 ./vdbench -t 即可验证一切是否正常运行。