Menu

Compile error, boost, Fedora

Help
Anonymous
2011-07-11
2013-04-21
  • Anonymous

    Anonymous - 2011-07-11

    Hi, thanks for making this programmer. I have the MikroE UNI-DS3 development board with an ATMega128 MCU card. The software configures fine, but when I do make I get this error:

    $ make
    make  all-am
    make: Entering directory `/home/tvl/Documents/tools/avrprog2-1.0.0'
    g++ -DHAVE_CONFIG_H -I.    -DCONFIG_DIR="\"/usr/local/share/avrprog2/\"" -DHOME_CONFIG_DIR="\".avrprog2/\"" -g -O2 -O2 -Wall -std=c++0x -MT src/avrprog2-CAVRDevice.o -MD -MP -MF src/.deps/avrprog2-CAVRDevice.Tpo -c -o src/avrprog2-CAVRDevice.o `test -f 'src/CAVRDevice.cpp' || echo './'`src/CAVRDevice.cpp
    src/CAVRDevice.cpp: In static member function ‘static void CAVRDevice::listDevices()’:
    src/CAVRDevice.cpp:180:38: error: ‘class boost::filesystem3::path’ has no member named ‘compare’
    src/CAVRDevice.cpp:194:38: error: ‘class boost::filesystem3::path’ has no member named ‘compare’
    make: ***  Error 1
    make: Leaving directory `/home/tvl/Documents/tools/avrprog2-1.0.0'
    make: ***  Error 2

    I run Fedora 15 and have boost and boost-devel version 1.46.0 (3.fc15) installed. What's wrong/missing?

     
  • Anonymous

    Anonymous - 2011-07-12

    It compiles on Ubuntu 10.10 (virtualbox install). I installed packages "make gcc g++ doxygen graphviz binutils-dev libusb-1.0-1-dev libboost-filesystem-dev". But my primary OS is Fedora, would like to make it work there as well.

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-07-18

    Hi,

    thanks for the report.
    avrprog2 will move to boost filesystem version 3 soon. Then it will also compile on fedora 15.

    Regards Andreas

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-07-18

    … In the meantime maybe it helps to add

    #define BOOST_FILESYSTEM_VERSION 2
    

    in the header file "avrprog.h"

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-07-19

    So, now i made the changes. Please checkout the version in the trunk tree.

    For building you need autoconf and automake.
    Follow these steps:

    autoreconf --install
    ./configure
    make
    sudo make install
    
     
  • Anonymous

    Anonymous - 2011-07-31

    I did what you suggested, but the compilation failed:

    some_more_compilation_output
    ...
    mv -f src/.deps/avrprog2-CUSBCommunication.Tpo src/.deps/avrprog2-CUSBCommunication.Po
    g++ -DHAVE_CONFIG_H -I.    -DCONFIG_DIR="\"/usr/local/share/avrprog2/\"" -DHOME_CONFIG_DIR="\".avrprog2/\"" -g -O2 -O2 -Wall -std=c++0x -MT src/avrprog2-main.o -MD -MP -MF src/.deps/avrprog2-main.Tpo -c -o src/avrprog2-main.o `test -f 'src/main.cpp' || echo './'`src/main.cpp
    mv -f src/.deps/avrprog2-main.Tpo src/.deps/avrprog2-main.Po
    g++ -DHAVE_CONFIG_H -I.    -DCONFIG_DIR="\"/usr/local/share/avrprog2/\"" -DHOME_CONFIG_DIR="\".avrprog2/\"" -g -O2 -O2 -Wall -std=c++0x -MT src/avrprog2-MyException.o -MD -MP -MF src/.deps/avrprog2-MyException.Tpo -c -o src/avrprog2-MyException.o `test -f 'src/MyException.cpp' || echo './'`src/MyException.cpp
    mv -f src/.deps/avrprog2-MyException.Tpo src/.deps/avrprog2-MyException.Po
    g++ -DCONFIG_DIR="\"/usr/local/share/avrprog2/\"" -DHOME_CONFIG_DIR="\".avrprog2/\"" -g -O2 -O2 -Wall -std=c++0x   -o avrprog2 src/avrprog2-CAVRDevice.o src/avrprog2-CAvrProgCommands.o src/avrprog2-CAVRprog.o src/avrprog2-CEEPROMOptions.o src/avrprog2-CFlashOptions.o src/avrprog2-CFormat.o src/avrprog2-CFusesOptions.o src/avrprog2-CHexFile.o src/avrprog2-CLArgumentException.o src/avrprog2-CMemoryOptions.o src/avrprog2-COut.o src/avrprog2-CProgramOptions.o src/avrprog2-CProgressbar.o src/avrprog2-CUSBCommunication.o src/avrprog2-main.o src/avrprog2-MyException.o  -lboost_system-mt -lboost_filesystem-mt -lbfd -lusb-1.0 
    /usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
    (.text+0x53c): undefined reference to `dlopen'
    /usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
    (.text+0x563): undefined reference to `dlsym'
    /usr/lib/libbfd.a(plugin.o): In function `try_load_plugin':
    (.text+0x5e9): undefined reference to `dlerror'
    collect2: ld returned 1 exit status
    make[1]: *** [avrprog2] Error 1
    make[1]: Leaving directory `/home/tvl/Documents/tools/avrprog2-1.0.0'
    make: *** [all] Error 2
    

    Next, I did the following and that made the compile work:

    --- Makefile.old    2011-07-31 21:32:52.738188120 +0200
    +++ Makefile    2011-07-31 21:32:02.760904167 +0200
    @@ -160,7 +160,7 @@
     INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
     LDFLAGS = 
     LIBOBJS = 
    -LIBS = -lboost_system-mt -lboost_filesystem-mt -lbfd -lusb-1.0 
    +LIBS = -lboost_system-mt -lboost_filesystem-mt -ldl -lbfd -lusb-1.0 
     LTLIBOBJS = 
     MAKEINFO = ${SHELL} /home/tvl/Documents/tools/avrprog2-1.0.0/build-aux/missing --run makeinfo
     MKDIR_P = /bin/mkdir -p
    

    Programming works too, I just tried with two test programs. Thanks! :-)

     
  • Andreas Hagmann

    Andreas Hagmann - 2011-08-01

    Interessting, on my Fedora test installation (32 bit) it compiles without your modifications. Do you use a 64 bit system?

     
  • Anonymous

    Anonymous - 2011-08-02

    No, I have a 32bit system.

    $ uname -a
    Linux novo.home.ctors.net 2.6.38.8-35.fc15.i686 #1 SMP Wed Jul 6 14:46:26 UTC 2011 i686 i686 i386 GNU/Linux
    $ lsb_release -a
    LSB Version:    :core-4.0-ia32:core-4.0-noarch
    Distributor ID: Fedora
    Description:    Fedora release 15 (Lovelock)
    Release:    15
    Codename:   Lovelock
    

    If you need anything else just send me a direct mail at tom$ctors,net. That may work faster. ;-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.