Problem with compiling the runtime libary

Hi All

Thanks for all replies regarding to my GCC problem.

I am trying to do profiling now and need to generate “profile_rt.so” file. I compiled the runtime library using MAKE and tried on both Windows and Mac, but the compiling can not be done properly. I got the following error message:

yafan zhao wrote:

Hi All
Thanks for all replies regarding to my GCC problem.
I am trying to do profiling now and need to generate "profile_rt.so"
file. I compiled the runtime library using MAKE and tried on both
Windows and Mac, but the compiling can not be done properly. I got the
following error message:
------------------------------
make: Entering directory `C:/llvm/runtime'
../Makefile.config.in:59 <http://Makefile.config.in:59>: *** Projects
must define PROJ_SRC_ROOT. Stop.
make: Leaving directory `C:/llvm/runtime'
-----------------------------
How to fix these errors? Is these any other way to compile the runtime
library and generate "profile_rt.so" file?

It looks like llvm/runtime is missing CMakeFile.txt's, and probably just can't be built when using cmake.

Do you know cmake well enough to write them? If so, please try it and send us a patch, otherwise I'll get to it eventually.

Nick

Hi Nick

Thanks for you reply.
CMAKE is very new to me. I complied using GNU WIN32 and got those errors. Is it possible to compile it using GNU WIN 32 and anything need to be modified?

I managed to compile the run time library on a mac machine.

Yafan

Hi, Zhao

  You can apply the attachment to LLVM 2.9 Release. It has been tested
on FreeBSD/x86.

Regards,
chenwj

patch-llvm-2.9 (1.38 KB)

Hi, Zhao

You can apply the attachment to LLVM 2.9 Release. It has been tested
on FreeBSD/x86.

Hi Chen, may I commit this (updated to include GCDAProfiling.cpp) to LLVM SVN?

Nick

Hi, Nick

  Sure. Please go ahead.

Regards,
chenwj

Hi Chen

Thanks for the attached patch file.

I have checked out llvm 2.9. There is only one CMakeLists file in “\llvm-2.9”. and no CMakeLists file in folder either “\llvm-2.9\runtime\libprofile” or “\llvm-2.9\runtime”. Where did you get it?

Yafan

2011/4/26 Nick Lewycky <nlewycky@google.com>

Hi, Zhao

I have checked out llvm 2.9. There is only one CMakeLists file in

  Release or svn? I believe Nick has committed those CMake files into
svn. You can apply my patch to LVM 2.9 Release.

"\llvm-2.9". and no CMakeLists file in folder either
"\llvm-2.9\runtime\libprofile" or "\llvm-2.9\runtime". Where did you get it?

  As Nick said, libprofile miss CMake files. Add them by yourself. :slight_smile:

Regards,
chenwj

Try Nick's r130191!

Hi Chen

Applied your patch to cmakelists files in LLVM 2.9 release and build llvm using Visual Studio 2008 successfully, but there is still no profile_rt.so. I do have profile_rt of visual studio solution file and project file in folder \llvm-2.9build\runtime\libprofile.

I also tried version2.9 form SVN and it has all necessary cmakelists files now, but I still have same problem (no profile_rt.so).

Did I miss any step? Where is your profile_rt.so located?

Many thanks again.

Yafan

yafan zhao <yafan.zhao@gmail.com> writes:

Hi Chen

Applied your patch to cmakelists files in LLVM 2.9 release and build llvm
using Visual Studio 2008 successfully, but there is still no profile_rt.so.
I do have profile_rt of visual studio solution file and project file in
folder \llvm-2.9build\runtime\libprofile.

I also tried version2.9 form SVN and it has all necessary cmakelists
files now, but I still have same problem (no profile_rt.so).

Did I miss any step? Where is your profile_rt.so located?

There are no *.so libraries on Windows. They are *.dll & *.lib.

There is no support for building LLVM loadable modules with Visual
Studio, as cmake says when you generate the project files.

So don't expect profile_rt.so (nor profile_rt.dll) with your setup.