Autotools->CMake build error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Autotools->CMake build error

Richard Shaw
I'm working on converting a project[1] from autotools to CMake and I've gotten a lot of it working. The project HEAVILY relies on values from a config.h but I think I've gotten the essentials covered although it took a while.

Currently the build is failing on the following:
[ 23%] Building CXX object src/CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o
cd /home/build/tmp/build_fldigi/src && /usr/lib64/ccache/c++   -DBUILD_FLDIGI -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/local/share/locale\" -DPKGDATADIR=\"/usr/local/share\" -DUSE_HAMLIB -DUSE_PNG -DUSE_PORTAUDIO -DUSE_PULSEAUDIO -DUSE_SAMPLERATE -DUSE_SNDFILE -DUSE_X -Wall -ffast-math -finline-functions -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -pthread -O3 -DNDEBUG -I/home/build/tmp/build_fldigi -I/home/build/git/fldigi/src/xmlrpcpp -I/home/build/git/fldigi/src/fileselector -I/home/build/git/fldigi/src/libtiniconv -I/home/build/git/fldigi/src/irrxml -I/home/build/git/fldigi/src/include -I/home/build/git/fldigi/src -I/usr/include/libpng16 -I/usr/include/alsa -I/home/build/tmp/build_fldigi/src -I/home/build/git/fldigi/src/flarq-src/include    -o CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o -c /home/build/git/fldigi/src/widgets/FTextRXTX.cxx
/home/build/git/fldigi/src/widgets/FTextRXTX.cxx:252:6: error: prototype for ‘void FTextRX::add(unsigned int, int)’ does not match any in class ‘FTextRX’
 void FTextRX::add(unsigned int c, int attr)
      ^
In file included from /home/build/git/fldigi/src/include/fl_digi.h:34:0,
                 from /home/build/git/fldigi/src/widgets/FTextRXTX.cxx:47:
/home/build/git/fldigi/src/include/FTextRXTX.h:50:15: error: candidates are: virtual void FTextRX::add(const char*, int)
  virtual void add(const char *s, int attr = RECV)
               ^
/home/build/git/fldigi/src/include/FTextRXTX.h:49:15: error:                 virtual void FTextRX::add(unsigned char, int)
  virtual void add(unsigned char c, int attr = RECV);
               ^
--- end ---

The automake line is:
g++ -DHAVE_CONFIG_H -I.  -DBUILD_FLDIGI -DLOCALEDIR=\"/usr/share/locale\" -I. -I./include -I./irrxml -I./libtiniconv -I./fileselector -I./xmlrpcpp -DPKGDATADIR=\"/usr/share/fldigi\"  -pthread -I/usr/include/alsa  -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT    -D_REENTRANT   -I/usr/include/libpng16       -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions  -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m64 -mtune=generic -c -o fldigi-FTextRXTX.o `test -f 'widgets/FTextRXTX.cxx' || echo './'`widgets/FTextRXTX.cxx
--- end ---

Besides a lot of extra flags enforced by Fedora, I can't seem to find the essential difference between the two.

Can someone point me in the right direction?

I was going to put in a link to my remote branch at sourceforge but I'm not able to push to it right now....

Thanks,
Richard


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Autotools->CMake build error

Kornel Benko
Am Donnerstag, 28. August 2014 um 14:36:45, schrieb Richard Shaw <[hidden email]>

> I'm working on converting a project[1] from autotools to CMake and I've
> gotten a lot of it working. The project HEAVILY relies on values from a
> config.h but I think I've gotten the essentials covered although it took a
> while.
>
> Currently the build is failing on the following:
> [ 23%] Building CXX object src/CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o
> cd /home/build/tmp/build_fldigi/src && /usr/lib64/ccache/c++
> -DBUILD_FLDIGI -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/local/share/locale\"
> -DPKGDATADIR=\"/usr/local/share\" -DUSE_HAMLIB -DUSE_PNG -DUSE_PORTAUDIO
> -DUSE_PULSEAUDIO -DUSE_SAMPLERATE -DUSE_SNDFILE -DUSE_X -Wall -ffast-math
> -finline-functions -I/usr/include/freetype2 -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -pthread -O3 -DNDEBUG
> -I/home/build/tmp/build_fldigi -I/home/build/git/fldigi/src/xmlrpcpp
> -I/home/build/git/fldigi/src/fileselector
> -I/home/build/git/fldigi/src/libtiniconv
> -I/home/build/git/fldigi/src/irrxml -I/home/build/git/fldigi/src/include
> -I/home/build/git/fldigi/src -I/usr/include/libpng16 -I/usr/include/alsa
> -I/home/build/tmp/build_fldigi/src
> -I/home/build/git/fldigi/src/flarq-src/include    -o
> CMakeFiles/fldigi.dir/widgets/FTextRXTX.cxx.o -c
> /home/build/git/fldigi/src/widgets/FTextRXTX.cxx
> /home/build/git/fldigi/src/widgets/FTextRXTX.cxx:252:6: error: prototype
> for ‘void FTextRX::add(unsigned int, int)’ does not match any in class
> ‘FTextRX’
>  void FTextRX::add(unsigned int c, int attr)
>       ^
> In file included from /home/build/git/fldigi/src/include/fl_digi.h:34:0,
>                  from /home/build/git/fldigi/src/widgets/FTextRXTX.cxx:47:
> /home/build/git/fldigi/src/include/FTextRXTX.h:50:15: error: candidates
> are: virtual void FTextRX::add(const char*, int)
>   virtual void add(const char *s, int attr = RECV)
>                ^
> /home/build/git/fldigi/src/include/FTextRXTX.h:49:15: error:
>   virtual void FTextRX::add(unsigned char, int)
>   virtual void add(unsigned char c, int attr = RECV);
>                ^
> --- end ---
>
> The automake line is:
> g++ -DHAVE_CONFIG_H -I.  -DBUILD_FLDIGI -DLOCALEDIR=\"/usr/share/locale\"
> -I. -I./include -I./irrxml -I./libtiniconv -I./fileselector -I./xmlrpcpp
> -DPKGDATADIR=\"/usr/share/fldigi\"  -pthread -I/usr/include/alsa
>  -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_THREAD_SAFE -D_REENTRANT    -D_REENTRANT   -I/usr/include/libpng16
> -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions  -DNDEBUG -O2
> -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
>  -m64 -mtune=generic -c -o fldigi-FTextRXTX.o `test -f
> 'widgets/FTextRXTX.cxx' || echo './'`widgets/FTextRXTX.cxx
> --- end ---
>
> Besides a lot of extra flags enforced by Fedora, I can't seem to find the
> essential difference between the two.
>
> Can someone point me in the right direction?
>
> I was going to put in a link to my remote branch at sourceforge but I'm not
> able to push to it right now....
>
> Thanks,
> Richard
>
> [1] http://www.w1hkj.com/Fldigi.html
You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
Differences between generation of this file of automake/cmake?

        Kornel
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autotools->CMake build error

Richard Shaw
On Thu, Aug 28, 2014 at 3:39 PM, Kornel Benko <[hidden email]> wrote:
You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
Differences between generation of this file of automake/cmake?

Could be but I think I found most of those. I tried browsing through the code and I didn't see any #if's that would affect what code is built but I can check again.

Thanks,
Richard 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Autotools->CMake build error

Kornel Benko
Am Donnerstag, 28. August 2014 um 15:47:06, schrieb Richard Shaw <[hidden email]>
> On Thu, Aug 28, 2014 at 3:39 PM, Kornel Benko <[hidden email]> wrote:
>
> > You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
> > Differences between generation of this file of automake/cmake?
> >
> > Could be but I think I found most of those. I tried browsing through the
> code and I didn't see any #if's that would affect what code is built but I
> can check again.

If your compiler is g++, you could try '-g3 -E' options to create preprocessed output.

E.g.:
        # cd /home/build/tmp/build_fldigi/src
        # g++ -g3 -E -DHAVE_CONFIG_H ... /home/build/git/fldigi/src/widgets/FTextRXTX.cxx > FTextRXTX.i


>
> Thanks,
> Richard

        Kornel
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Autotools->CMake build error

Richard Shaw
On Thu, Aug 28, 2014 at 4:07 PM, Kornel Benko <[hidden email]> wrote:
Am Donnerstag, 28. August 2014 um 15:47:06, schrieb Richard Shaw <[hidden email]>
> On Thu, Aug 28, 2014 at 3:39 PM, Kornel Benko <[hidden email]> wrote:
>
> > You use '-DHAVE_CONFIG_H', this means probably generated 'config.h'.
> > Differences between generation of this file of automake/cmake?

You were right to begin with, I implemented all the HAVE_<x> stuff but missed a part where it had a conditional for what version of FLTK was being used. The FindFLTK module doesn't report the API version (fltk-config --api-version) and upstream doesn't plan on supporting versions <1.3 anymore so I just hardcoded it into config.h.in for now.

Thanks,
Richard 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake