LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   FreeCAD build fail under slackware 14.0 (http://www.linuxquestions.org/questions/slackware-14/freecad-build-fail-under-slackware-14-0-a-4175434397/)

marbangens 10-27-2012 02:26 PM

FreeCAD build fail under slackware 14.0
 
I can't builds FreeCAD on slackware 14.0.
Dependencies are installed.
And I only know a little about C.
I have no ides...
Tell me if you need anything.

Code:

IC -DPIC -o .libs/libDrawingGui_la-DrawingView.o
In file included from DrawingView.cpp:58:0:
../../../../src/Base/Stream.h:68:32: error: declaration of 'operator<<' as non-function
../../../../src/Base/Stream.h:68:28: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:68:40: error: expected ')' before 'uch'
../../../../src/Base/Stream.h:70:32: error: declaration of 'operator<<' as non-function
../../../../src/Base/Stream.h:70:28: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:70:41: error: expected ')' before 'us'
../../../../src/Base/Stream.h:72:32: error: declaration of 'operator<<' as non-function
../../../../src/Base/Stream.h:72:28: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:72:41: error: expected ')' before 'ui'
../../../../src/Base/Stream.h:74:32: error: declaration of 'operator<<' as non-function
../../../../src/Base/Stream.h:74:28: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:74:41: error: expected ')' before 'ul'
../../../../src/Base/Stream.h:98:31: error: declaration of 'operator>>' as non-function
../../../../src/Base/Stream.h:98:27: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:98:38: error: expected ')' before '&' token
../../../../src/Base/Stream.h:100:31: error: declaration of 'operator>>' as non-function
../../../../src/Base/Stream.h:100:27: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:100:39: error: expected ')' before '&' token
../../../../src/Base/Stream.h:102:31: error: declaration of 'operator>>' as non-function
../../../../src/Base/Stream.h:102:27: error: expected ';' at end of member declaration
../../../../src/Base/Stream.h:102:39: error: expected ')' before '&' token
../../../../src/Base/Stream.h:104:31: error: declaration of 'operator>>' as non-
../../../../src/Base/Stream.h:104:27: error: expected ';' at end of member decla
../../../../src/Base/Stream.h:104:39: error: expected ')' before '&' token
make[7]: *** [libDrawingGui_la-DrawingView.lo] Error 1
make[7]: Leaving directory `/tmp/SBo/FreeCAD-0.12.5284/src/Mod/Drawing/Gui'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/tmp/SBo/FreeCAD-0.12.5284/src/Mod/Drawing/Gui'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/tmp/SBo/FreeCAD-0.12.5284/src/Mod/Drawing/Gui'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/SBo/FreeCAD-0.12.5284/src/Mod/Drawing'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/SBo/FreeCAD-0.12.5284/src/Mod'
make[2]: *** [all-recursive] Error 1

This is my /tmp/SBo/FreeCAD-0.12.5284/src/Base/Stream.h

Code:

/***************************************************************************
 *  Copyright (c) 2007 Werner Mayer <wmayer[at]users.sourceforge.net>    *
 *                                                                        *
 *  This file is part of the FreeCAD CAx development system.              *
 *                                                                        *
 *  This library is free software; you can redistribute it and/or        *
 *  modify it under the terms of the GNU Library General Public          *
 *  License as published by the Free Software Foundation; either          *
 *  version 2 of the License, or (at your option) any later version.      *
 *                                                                        *
 *  This library  is distributed in the hope that it will be useful,      *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
 *  GNU Library General Public License for more details.                  *
 *                                                                        *
 *  You should have received a copy of the GNU Library General Public    *
 *  License along with this library; see the file COPYING.LIB. If not,    *
 *  write to the Free Software Foundation, Inc., 59 Temple Place,        *
 *  Suite 330, Boston, MA  02111-1307, USA                                *
 *                                                                        *
 ***************************************************************************/


#ifndef BASE_STREAM_H
#define BASE_STREAM_H


#include <fstream>
#include <ios>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>

class QByteArray;
class QIODevice;
class QBuffer;

namespace Base {

class BaseExport Stream
{
public:
    enum ByteOrder { BigEndian, LittleEndian };
   
    ByteOrder byteOrder() const;
    void setByteOrder(ByteOrder);

protected:
    Stream();
    virtual ~Stream();

    bool _swap;
};

/**
 * The OutputStream class provides writing of binary data to an ostream.
 * @author Werner Mayer
 */
class BaseExport OutputStream : public Stream
{
public:
    OutputStream(std::ostream &rout);
    ~OutputStream();

    OutputStream& operator << (bool b);
    OutputStream& operator << (int8_t ch);
    OutputStream& operator << (uint8_t uch);
    OutputStream& operator << (int16_t s);
    OutputStream& operator << (uint16_t us);
    OutputStream& operator << (int32_t i);
    OutputStream& operator << (uint32_t ui);
    OutputStream& operator << (int64_t l);
    OutputStream& operator << (uint64_t ul);
    OutputStream& operator << (float f);
    OutputStream& operator << (double d);

private:
    OutputStream (const OutputStream&);
    void operator = (const OutputStream&);

private:
    std::ostream& _out;
};

/**
 * The InputStream class provides reading of binary data from an istream.
 * @author Werner Mayer
 */
class BaseExport InputStream : public Stream
{
public:
    InputStream(std::istream &rin);
    ~InputStream();

    InputStream& operator >> (bool& b);
    InputStream& operator >> (int8_t& ch);
    InputStream& operator >> (uint8_t& uch);
    InputStream& operator >> (int16_t& s);
    InputStream& operator >> (uint16_t& us);
    InputStream& operator >> (int32_t& i);
    InputStream& operator >> (uint32_t& ui);
    InputStream& operator >> (int64_t& l);
    InputStream& operator >> (uint64_t& ul);
    InputStream& operator >> (float& f);
    InputStream& operator >> (double& d);

    operator bool() const
    {
        // test if _Ipfx succeeded
        return !_in.eof();
    }

private:
    InputStream (const InputStream&);
    void operator = (const InputStream&);

private:
    std::istream& _in;
};

// ----------------------------------------------------------------------------

/**
 * This class implements the streambuf interface to write data to a QByteArray.
 * This class can only be used for writing but not for reading purposes.
 * @author Werner Mayer
 */
class BaseExport ByteArrayOStreambuf : public std::streambuf
{
public:
    explicit ByteArrayOStreambuf(QByteArray& ba);
    ~ByteArrayOStreambuf();

protected:
    virtual int_type overflow(std::streambuf::int_type v);
    virtual std::streamsize xsputn (const char* s, std::streamsize num);
    virtual pos_type seekoff(std::streambuf::off_type off,
        std::ios_base::seekdir way,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
    virtual pos_type seekpos(std::streambuf::pos_type sp,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);

private:
    QBuffer* _buffer;
};

/**
 * This class implements the streambuf interface to read data from a QByteArray.
 * This class can only be used for reading but not for writing purposes.
 * @author Werner Mayer
 */
class BaseExport ByteArrayIStreambuf : public std::streambuf
{
public:
    explicit ByteArrayIStreambuf(const QByteArray& buf);
    ~ByteArrayIStreambuf();

protected:
    virtual int_type uflow();
    virtual int_type underflow();
    virtual int_type pbackfail(int_type ch);
    virtual std::streamsize showmanyc();
    virtual pos_type seekoff(std::streambuf::off_type off,
        std::ios_base::seekdir way,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
    virtual pos_type seekpos(std::streambuf::pos_type pos,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);

private:
    const QByteArray& _buffer;
    int _beg, _end, _cur;
};

/**
 * Simple class to write data directly into Qt's QIODevice.
 * This class can only be used for writing but not reading purposes.
 * @author Werner Mayer
 */
class BaseExport IODeviceOStreambuf : public std::streambuf
{
public:
    IODeviceOStreambuf(QIODevice* dev);
    ~IODeviceOStreambuf();

protected:
    virtual int_type overflow(std::streambuf::int_type v);
    virtual std::streamsize xsputn (const char* s, std::streamsize num);
    virtual pos_type seekoff(std::streambuf::off_type off,
        std::ios_base::seekdir way,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
    virtual pos_type seekpos(std::streambuf::pos_type sp,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
protected:
    QIODevice* device;
};

/**
 * Simple class to read data directly from Qt's QIODevice.
 * This class can only be used for readihg but not writing purposes.
 * @author Werner Mayer
 */
class BaseExport IODeviceIStreambuf : public std::streambuf
{
public:
    IODeviceIStreambuf(QIODevice* dev);
    ~IODeviceIStreambuf();

protected:
    virtual int_type underflow();
    virtual pos_type seekoff(std::streambuf::off_type off,
        std::ios_base::seekdir way,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
    virtual pos_type seekpos(std::streambuf::pos_type sp,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);

protected:
    QIODevice* device;
    /* data buffer:
    * - at most, pbSize characters in putback area plus
    * - at most, bufSize characters in ordinary read buffer
    */
    static const int pbSize = 4;        // size of putback area
    static const int bufSize = 1024;    // size of the data buffer
    char buffer[bufSize+pbSize];        // data buffer
};

class BaseExport Streambuf : public std::streambuf
{
public:
    explicit Streambuf(const std::string& data);
    ~Streambuf();

protected:
    virtual int_type uflow();
    virtual int_type underflow();
    virtual int_type pbackfail(int_type ch);
    virtual std::streamsize showmanyc();
    virtual pos_type seekoff(std::streambuf::off_type off,
        std::ios_base::seekdir way,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);
    virtual pos_type seekpos(std::streambuf::pos_type pos,
        std::ios_base::openmode which =
            std::ios::in | std::ios::out);

private:
    std::string::const_iterator _beg;
    std::string::const_iterator _end;
    std::string::const_iterator _cur;
};

// ----------------------------------------------------------------------------

class FileInfo;

/**
 * The ofstream class is provided for convenience. On Windows
 * platforms it opens a stream with UCS-2 encoded file name
 * while on Linux platforms the file name is UTF-8 encoded.
 * @author Werner Mayer
 */
class BaseExport ofstream : public std::ofstream
{
public:
    ofstream(const FileInfo& fi, ios_base::openmode mode =
                                std::ios::out | std::ios::trunc);
    virtual ~ofstream();
};

/**
 * The ofstream class is provided for convenience. On Windows
 * platforms it opens a stream with UCS-2 encoded file name
 * while on Linux platforms the file name is UTF-8 encoded.
 * @author Werner Mayer
 */
class BaseExport ifstream : public std::ifstream
{
public:
    ifstream(const FileInfo& fi, ios_base::openmode mode =
                                std::ios::in);
    virtual ~ifstream();
};

} // namespace Base

#endif // BASE_STREAM_H


business_kid 10-27-2012 03:15 PM

When you're posting a build fail, best to reenter the make command. post the make line, gcc line and first few errors, of which the first is vital. Good also to wrap it in code tags (as you did).

It looks like a C versions thing - hard to be sure. C has tightened up over the years and what would compile with gcc-2.95x baled out with gcc-3.x and more so with gcc-4.xx. Is it configured with some fail on warnings option? Have you tried make -k? (continue if possible on errors). You may need an older version of gcc, older kernel headers, or something. Are you sure we see the first error?

marbangens 10-27-2012 03:24 PM

Quote:

Originally Posted by business_kid (Post 4816361)
When you're posting a build fail, best to reenter the make command. post the make line, gcc line and first few errors, of which the first is vital.

Do you mean something like

root@compaq:/usr/src/FreeCAD# ./FreeCAD.SlackBuild > /home/martin/build_out.log

and past that. I use xterm and my scroll back isn't that long.

marbangens 10-27-2012 03:57 PM

this is the first error

Code:

svn: E155007: '/tmp/SBo/FreeCAD-0.12.5284' is not a working copy
/usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB
/usr/share/aclocal/imlib.m4:9:  run info '(automake)Extending aclocal'
/usr/share/aclocal/imlib.m4:9:  or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
configure.ac:68: installing `m4/config.guess'
configure.ac:68: installing `m4/config.sub'
configure.ac:12: installing `m4/install-sh'
configure.ac:12: installing `m4/missing'
src/3rdParty/salomesmesh/Makefile.am: installing `m4/depcomp'
^C

No there is no make -k in the script.
I'm building now. soon I will post the complete output from the script

marbangens 10-27-2012 05:28 PM

the build log is 1.7 Mb! I cant upload it here.
and I most sleep now.

ljb643 10-27-2012 05:30 PM

Based on the error messages in your first post, it looks to me like there are typedefs missing: uint8_t, uint16_t, uint32_t, and uint64_t (unsigned integer types). I see these in <stdint.h>, but there are other definitions there that are not causing errors... (If there is a support forum for that product, you probably should try there - looking for something like "... does not compile with gcc-4.7.x" - perhaps there is an update.)

adriv 10-28-2012 02:55 AM

Builds fine on a stock SW-14 (64) machine, full install. Used all dependencies from SBo, including the optional ones, in this particular order:
Code:

tbb
gl2ps
eigen3
xerces-c
ftgl
FreeImage
OpenCASCADE
Coin
SoQt
Pivy
FreeCAD

Is hat the same as you have?

marbangens 10-28-2012 09:58 AM

Quote:

Originally Posted by adriv (Post 4816559)
Is hat the same as you have?

I didn't include FreeImage and tbb.
I think I missed FeeImage and skipped tbb
because I don't have smp support in my machine
and linux kernel.

I'll give it another tray.

marbangens 10-28-2012 04:35 PM

I still got the same error

TommyC7 10-28-2012 04:40 PM

Did you do a full installation of Slackware? If you didn't, perhaps you missed a few necessary libs?

marbangens 10-28-2012 05:26 PM

yes I did without kde and xface . I have all the libs.
I have to go to sleep now thanks for the help.

business_kid 10-29-2012 04:36 AM

Quote:

Originally Posted by marbangens (Post 4816994)
yes I did without kde and xface . I have all the libs.
I have to go to sleep now thanks for the help.

So you installed X, but no window manager? Or you didn't install X? In my experience, any shortcut taken with compiling comes back to bite you.
Quote:

Originally Posted by marbangens (Post 4816994)
IC -DPIC -o .libs/libDrawingGui_la-DrawingView.o

Looks like a graphical thing. What you did with X may be important.I would install Freeimage & tbb if only for the build as well. You can uninstall them later.

marbangens 10-29-2012 11:07 AM

I have installed lxde from slackbuilds, no I have not excluded x base packs.
I may have bin tired and removed something I don't remember. I would likely do
something like that. And also I hate the nvidia proprietary driver I'm using.
I think I will do a big clean up and check may packages. And go for xfce och kde.
because those environment are fully supported by slackware.I'm not an hardcore
hacker. Tired of not knowing whats going on with my system, plus I am my own system
manager. Next time I will know what I'm doing before doing it on my main computer.

marbangens 10-29-2012 11:26 AM

I need to use the 3.0.x kernel for my internal mic on this laptop to work. And like to use
nouveau now.

how to build and make packages for another kernel correctly on slackware?
I want to do this right from the start.(no experimenting this time)

Do I need to create an custom kernel header package for my kernel?
will I be able to compile programs with my 3.2.x headers installed.

glibc? don't what to mess that up. Do I need to touch it?

What relay is impotent when compiling my custom kernel?

what guide, or sources can I trust?

and this last question shall I start a new thread for this?

marbangens 10-29-2012 11:57 AM

I'm reading
http://alien.slackbook.org/dokuwiki/...kernelbuilding
and
http://www.slackbook.org/html/system...KERNEL-COMPILE


I post here when my system is stable.


All times are GMT -5. The time now is 06:06 PM.