# Compilation error stops on file lib/period/period.cDe

P
Thread Starter

#### Peter Hopfgartner

Dear list-members,

while trying to compile LinuxPLC, todays CVS, the compiler stopped on the file lib/period/period.c with the following message:

gcc -Wall -Wpointer-arith -Wstrict-prototypes -Wwrite-strings -ggdb -O3
-funroll-loops -I. -c -fPIC -DPIC period/period.c -o
period/.libs/period.lo
period/period.c:76: parse error before _timer_id'
period/period.c:76: warning: type defaults to int' in declaration of
_timer_id'
period/period.c:76: warning: data definition has no type or storage
class
period/period.c: In function period_init':
period/period.c:182: warning: implicit declaration of function
clock_getres'
period/period.c:182: CLOCK_REALTIME' undeclared (first use in this
function)
period/period.c:182: (Each undeclared identifier is reported only once
period/period.c:182: for each function it appears in.)
period/period.c:277: warning: implicit declaration of function
timer_create'
period/period.c: In function period_done':
period/period.c:315: warning: implicit declaration of function
timer_delete'
period/period.c: In function plc_period_set':
period/period.c:409: storage size of time_value' isn't known
period/period.c:422: warning: implicit declaration of function
timer_settime'
period/period.c:409: warning: unused variable time_value'
period/period.c:424: Internal compiler error in
gen_tagged_type_instantiation_die', at dwarf2out.c:9308
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [period/period.lo] Error 1

In line 76, <static timer_t _timer_id = -1;> the type timer_t is used. Where can I find the definition of this type. Is it a POSIX type or does it come with LinuxPLC?

I'm running a Debian 2.2 distribution on an Intel P3 processor, gcc-2.95.2, glibc 2.1, uname = Linux bonobo 2.2.19 #1 Fri Jun 22 14:01:01 CEST 2001 i686 unknown.

Thank you for your attention,

Peter Hopfgartner

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

J

#### Juan Carlos Orozco

Mario de Sousa helped me with this same issue, the problem is that debian is conservative with their package selection, the period libraries was
recently changed to be POSIX compliant and this POSIX compliant timer functions where not available in the libc6 package in the potato version of debian. You need a newer version of the libc6 and libc6-dev packages. I am
using version 2.2.3-9 of this libraries which is the one in the woody (testing) version of debian.

The solution (at your own risk) is to change the apt sources.list file (/etc/apt/sources.list) to include the testing version of debian (add a deb
line that substitutes stable for testing). Then run apt-get install libc6-dev. Then restore the sources.list to its original form (stable). I
mentioned at your own risk because this will be an hybrid system potato-woody, it worked for me though. This situation is not nice because
LinuxPLC now requires woody at least for this libraries but woody is not yet a stable debian release and Debian used to be our easy path to
LinuxPLC, of course using this trick solves the problem and being POSIX compliant is a higier priority so for the time being this is the situation.

Regards,

Juan Carlos Orozco

ACElab Industrial Automation
[email protected]
www.ace-lab.com

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

P

#### Peter Hopfgartner

On 31 Aug 2001 10:07:30 -0500, Juan Carlos Orozco wrote:
>
> Mario de Sousa helped me with this same issue, the problem is that debian
> is conservative with their package selection, the period libraries was
> recently changed to be POSIX compliant and this POSIX compliant timer
> functions where not available in the libc6 package in the potato version of
> debian. You need a newer version of the libc6 and libc6-dev packages. I am
> using version 2.2.3-9 of this libraries which is the one in the woody
> (testing) version of debian.

Hmmm, theoretically glibc 2.2 should be downward compatible to glibc 2.1.

> The solution (at your own risk) is to change the apt sources.list file
> (/etc/apt/sources.list) to include the testing version of debian (add a deb
> line that substitutes stable for testing). Then run apt-get install
> libc6-dev. Then restore the sources.list to its original form (stable). I
> mentioned at your own risk because this will be an hybrid system
> potato-woody, it worked for me though. This situation is not nice because
> LinuxPLC now requires woody at least for this libraries but woody is not
> yet a stable debian release and Debian used to be our easy path to
> LinuxPLC, of course using this trick solves the problem and being POSIX
> compliant is a higier priority so for the time being this is the situation.
>
> Regards,
>
> Juan Carlos Orozco

I will try on a RedHat 7.1 installation. This should be ok until the next Debian release is ready.

&lt;tiny flame>
I like Debian, but I really start to run into more and more problems for the slow release cycle! (mostly for glibc 2.2, but also for the kernel, XFree86, etc.). At least Gnome can be kept current, since the nice guys at Ximian provide a flawless install for Debian 2.1.
&lt;/tiny flame>

Thank you very much for your exhaustive help, maybe in the end I will put glibc 2.2 on the Debian installation.

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

P

#### Peter Hopfgartner

I think that installation on Debian might be a FAQ. So, starting from your exhaustive answer, I started to collect some hints on how to install LinuxPLC on Debian-2.2

Anyway, I'm still not able to have the GTK-demos running and will continue to try. BTW, the demos run fine on Mandrake 8.0.

So, in the hope that my collected notes can be usefull to some other Debian user, I attached them to this mail.

Regards,

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

J

#### Juan Carlos Orozco

Peter Hopfgartner wrote:
>
> I think that installation on Debian might be a FAQ. So, starting from your
> exhaustive answer, I started to collect some hints on how to
> install LinuxPLC on
> Debian-2.2
>
> Anyway, I'm still not able to have the GTK-demos running and will
> continue to try. BTW, the demos run fine on Mandrake 8.0.
>

Could you give me more information on the problem you are experiencing to run the GTK-demos. I am currently trying them on two Linux machines that
have debian with my hybrid configuration (potato-woody) and they work fine. With more details we should be able to find the missing part and this could go into the FAQ part that you are writing too. I think the problem may be on another library that is needed from woody instead of potato. My way of setting up my debian machines is starting with a potato CD, I install without additional packages then I change the /etc/apt/source.list file to include testing and then I install X, gnome, glade, gcc, libc6... So I may have a more woody than potato system. From my experience this hybrid system is working fine (stable). I originally intended to install woody but since there is no CD for woody as far as I know, this was my way of upgrading. I also tried using the woody installer but it crashed when trying to get the packages from internet and I was discouraged to proceed in this direction.

Your comment about LinuxPLC demos working fine under Mandrake 8.0 will also be a good addition to the FAQ under operating system compatibility issues. We may add comments about RedHat 7.1 compatibility later, Mario was working on this.

> So, in the hope that my collected notes can be usefull to some other
> Debian user, I attached them to this mail.
>

I am sure they will.

Regards,

Juan Carlos Orozco

ACElab Industrial Automation
[email protected]
www.ace-lab.com

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

P

#### Peter Hopfgartner

On 05 Sep 2001 10:52:17 -0500, Juan Carlos Orozco wrote:
> Could you give me more information on the problem you are experiencing to
> run the GTK-demos. I am currently trying them on two Linux machines that
> have debian with my hybrid configuration (potato-woody) and they work fine.
> With more details we should be able to find the missing part and this could
> go into the FAQ part that you are writing too. I think the problem may be on
> another library that is needed from woody instead of potato. My way of
> setting up my debian machines is starting with a potato CD, I install
> without additional packages then I change the /etc/apt/source.list file to
> include testing and then I install X, gnome, glade, gcc, libc6... So I may
> have a more woody than potato system. From my experience this hybrid system
> is working fine (stable). I originally intended to install woody but since
> there is no CD for woody as far as I know, this was my way of upgrading. I
> also tried using the woody installer but it crashed when trying to get the
> packages from internet and I was discouraged to proceed in this direction.

Well, I did a apt-get -f install, debian adjusted itself and now the demos run (did it an hour ago). Sorry for not having you told immediatly
that everything works.

> Your comment about LinuxPLC demos working fine under Mandrake 8.0 will also
> be a good addition to the FAQ under operating system compatibility issues.
> We may add comments about RedHat 7.1 compatibility later, Mario was working
> on this.
>
> > So, in the hope that my collected notes can be usefull to some other
> > Debian user, I attached them to this mail.
> >
>
> I am sure they will.
>

Glad to have done something usefull for the project!

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc

Similar threads