[Vm-dev] unix CMake compilation error

Javier Pimás elpochodelagente at gmail.com
Tue Feb 23 18:07:45 UTC 2010


Well, it's been two weeks and no responses, so I had to find out myself by
learning a lot of cmake. Here I attach some code that will fix the issue:

Index: Plugins.cmake
===================================================================
--- Plugins.cmake    (revisión: 2149)
+++ Plugins.cmake    (copia de trabajo)
@@ -3,13 +3,29 @@
 # Last edited: 2009-09-17 09:34:24 by piumarta on ubuntu.piumarta.com

 FILE (STRINGS ${src}/plugins.int plugins_int)
-STRING (REGEX REPLACE ".*= (.*)" "\\1" plugins_int ${plugins_int})
-STRING (REPLACE " " ";" plugins_int ${plugins_int})
+STRING (REGEX REPLACE ".*=(.*)" "\\1" plugins_int ${plugins_int})

+SET (plugins_int_str None)
+SET (plugins_ext_str None)
+
+IF (plugins_int)
+  STRING (STRIP plugin_int ${plugins_int})
+  SET (plugins_int_str ${plugins_int})
+  STRING (REPLACE " " ";" plugins_int ${plugins_int})
+ENDIF ()
+
 FILE (STRINGS ${src}/plugins.ext plugins_ext)
-STRING (REGEX REPLACE ".*= (.*)" "\\1" plugins_ext ${plugins_ext})
-STRING (REPLACE " " ";" plugins_ext ${plugins_ext})
+STRING (REGEX REPLACE ".*=(.*)" "\\1" plugins_ext ${plugins_ext})

+IF (plugins_ext)
+  STRING (STRIP plugin_ext ${plugins_ext})
+  SET (plugins_ext_str ${plugins_ext})
+  STRING (REPLACE " " ";" plugins_ext ${plugins_ext})
+ENDIF ()
+
+MESSAGE(STATUS internal plugins: "${plugins_int_str}")
+MESSAGE(STATUS external plugins: "${plugins_ext_str}")
+
 FILE (GLOB plugins_vm RELATIVE ${unix} ${unix}/vm-*)

 FILE_COPY (${bld}/disabledPlugins.c ${config}/disabledPlugins.c)

Regards,
            Javier.

On Thu, Feb 4, 2010 at 2:09 AM, melkyades <elpochodelagente at gmail.com>wrote:

>
>
> Hi, I'm trying to compile my own vm on linux (ubuntu 9.10, gcc 4.4.1, cmake
> 2.8.0) and found that, after generating the C sources, configure script
> will
> fail in cmake if you don't use at least one internal and one external
> plugin. This seems get fixed if I use at least one internal plugin (anyone)
> and at least one external. Did anybody have this problem too??
>
> Here is a small part of the error message (the entire one is longer):
>
> ...
>
> -- vm-sound-pulse: /usr/lib/libpulse-simple.so
> -- vm-sound-ALSA: /usr/include/alsa/asoundlib.h
> -- vm-sound-ALSA: /usr/lib/libasound.so
> -- vm-sound-Sun: sys/audioio.h not found
> -- vm-sound-Sun: sun/audioio.h not found
> -- vm-sound-Sun: /usr/include/stropts.h
> !! vm-sound-Sun disabled
> -- vm-sound-OSS: /usr/include/alsa/asoundlib.h
> -- vm-sound-OSS: /usr/lib/libasound.so
> !! vm-sound-MacOSX disabled
> CMake Error: Error in cmake code at
> /home/javier/st/squeak-svn/bld/#/CMakeLists.txt:16:
> Parse error.  Function missing ending ")".  End of file reached.
> You have called ADD_LIBRARY for library Automatically without any source
> files. This typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library generated without any source files.
> This typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library makefile without any source files.
> This typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library include without any source files.
> This typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library for without any source files. This
> typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library internal without any source files.
> This typically indicates a problem with your CMakeLists.txt file
> You have called ADD_LIBRARY for library pluginsINTERNAL_PLUGINS without any
> source files. This typically indicates a problem with your CMakeLists.txt
> file
> CMake Warning (dev) at /home/javier/st/squeak-svn/bld/=/CMakeLists.txt:1
> (ADD_DEFINITIONS):
>  Syntax error in cmake code at
>
>    /home/javier/st/squeak-svn/bld/=/CMakeLists.txt:1
>
>  when parsing string
>
>    ${=_definitions}
>
>  syntax error, unexpected cal_SYMBOL, expecting } (16)
>
>  Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
>  "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
>  command to set the policy and suppress this warning.
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> CMake Warning (dev) at /home/javier/st/squeak-svn/bld/=/CMakeLists.txt:2
> (LINK_DIRECTORIES):
>  Syntax error in cmake code at
>
>    /home/javier/st/squeak-svn/bld/=/CMakeLists.txt:2
>
>  when parsing string
>
>    ${=_link_directories}
>
>  syntax error, unexpected cal_SYMBOL, expecting } (21)
>
> ...
>
>
> --
> View this message in context:
> http://n4.nabble.com/unix-CMake-compilation-error-tp1462169p1462169.html
> Sent from the Squeak - VM mailing list archive at Nabble.com.
>



-- 
Javier Pimás
Ciudad de Buenos Aires
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100223/1626c0b3/attachment.htm


More information about the Vm-dev mailing list