Compile error

24 views
Skip to first unread message

Mike

unread,
Dec 28, 2009, 6:24:53 AM12/28/09
to OpenQM-OpenSource
Hi,

So I exported from the svn repository and did ./buildgpl and I get the
following erro message

k_error
cc1: warnings being treated as errors
gplsrc/k_error.c: In function ‘k_error’:
gplsrc/k_error.c:246: error: format not a string literal and no format
arguments


This is on ubuntu 9.10

Is this expected?

Regards
Mike

Ashley Chapman

unread,
Dec 28, 2009, 7:10:08 AM12/28/09
to openqm-o...@googlegroups.com
2009/12/28 Mike <mg.r...@gmail.com>:

> Hi,
>
> So I exported from the svn repository

Good for you! I can't get this step to work for me. Undoubtedly
because I don't know what I'm doing with svn. How did you make it
work?

and did ./buildgpl and I get the
> following erro message
>
> k_error
> cc1: warnings being treated as errors
> gplsrc/k_error.c: In function ‘k_error’:
> gplsrc/k_error.c:246: error: format not a string literal and no format
> arguments

Edit the buildgpl script, and remove -Werror from the QM_GCC_OPTIONS
line, and try again. If that don't work, try adding -Wno-packed. If
that don't work , try adding -Wno-pointer-sign.


Ashley Chapman

Mike

unread,
Dec 28, 2009, 10:59:17 AM12/28/09
to OpenQM-OpenSource
svn is easy..... - I must presume that you have "apt-get install
subversion" first

"svn export http://whatever qmsys"
will export the repository at the point you make and create a
directory qmsys

Alternatively,
"svn co http://whatever qmsys"
will check out the repository to a working copy named qmsys where
every directory will have a .svn control directory and you can commit
and update from your working copy.

On 28 Dec, 12:10, Ashley Chapman <ash.chap...@gmail.com> wrote:
> 2009/12/28 Mike <mg.ry...@gmail.com>:

No, that did not appear to be the issue, so I check line 246 in the c-
code - OMG that is scary. I changed the line which read "sprintf(s +
n, sysmsg(1120));" to "sprintf(s + n, sysmsg(1120),"none");" and the
error message est disparu. It looked like sprintf required 3 arguments
- whatever sprintf might be....

>
> Ashley Chapman

Ashley Chapman

unread,
Dec 30, 2009, 12:44:58 PM12/30/09
to openqm-o...@googlegroups.com
Mike

2009/12/28 Mike <mg.r...@gmail.com>:


> svn is easy..... - I must presume that you have "apt-get install
> subversion" first
>
> "svn export http://whatever qmsys"
> will export the repository at the point you make and create a
> directory qmsys
>
> Alternatively,
> "svn co http://whatever qmsys"
> will check out the repository to a working copy named qmsys where
> every directory will have a .svn control directory and you can commit
> and update from your working copy.

Thanks for the pointers. Perhaps I'll make an update to the wiki to
clarify things.

> No, that did not appear to be the issue, so I check line 246 in the c-
> code - OMG that is scary. I changed the line which read "sprintf(s +
> n, sysmsg(1120));" to "sprintf(s + n, sysmsg(1120),"none");" and the
> error message est disparu. It looked like sprintf required 3 arguments
> - whatever sprintf might be....

I've taken a look at the version of k_error.c in QM2.6-6, and it seems
identical (according to diff). So the error messages looks to be
something uncovered by a change in the compiler/OS/libraries/etc.

I'll look further...

Ashley Chapman

Ashley Chapman

unread,
Jan 10, 2010, 8:00:06 AM1/10/10
to openqm-o...@googlegroups.com
>
> I've taken a look at the version of k_error.c in QM2.6-6, and it seems
> identical (according to diff). So the error messages looks to be
> something uncovered by a change in the compiler/OS/libraries/etc.
>
> I'll look further...

Well, I finally managed to get free of the snow and out to the server room.

It looks like a change in gcc (or libraries). The Scarlet trunk
snapshot works fine with Ubunto 8.4.3, but produces the error with
Ubuntu 9.10.

Ubunto 9.10 uses gcc 4.4.1, whereas 8.4 uses gcc 4.2.4. Perhaps
there's an appropriate option for gcc, which uses the old behaviour.
Or it might be better to change the code so it compiles cleanly with
either gcc version.

So, if you remove the -Werror option in the buildgpl script, it
compiles whilst warning about the k_error.c file.

I really don't know my way around gcc, so can somebody else comment.


Ashley

Reply all
Reply to author
Forward
0 new messages