unix CMake compilation error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

unix CMake compilation error

melkyades
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)

...

Reply | Threaded
Open this post in threaded view
|

Re: unix CMake compilation error

melkyades
 
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: unix CMake compilation error

David T. Lewis
 
Excellent, thank you for sending the patch.

You might be sorry that you admitted that you know cmake. Now people
will probably start asking you questions about it ;-)

Dave

On Tue, Feb 23, 2010 at 03:07:45PM -0300, Javier Pim??s wrote:

>  
> 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 <[hidden email]>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