Ticket #2155 (in_testing defect)

Opened 4 years ago

Last modified 4 years ago

opkg-native do_compile failed

Reported by: manitu Owned by: tick
Priority: high Milestone:
Component: opkg Version:
Severity: blocker Keywords: opkg opkg-native do_compile SUSE11.0 compile error free_error_list opkh_cmd.c opkg_cmd opkg_print_error_list
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: yes PatchReviewResult:
Reproducible: always

Description

hi there, i tried to compile with the mokomakefile, all worked fine, but at task 3138 of 4229 (ID: 50, openembedded/packages/opkg/opkg-native) an error came up

opkg_cmd.c: In function 'opkg_print_error_list':
opkg_cmd.c:154: error: call to function 'free_error_list' without a real prototype
opkg_utils.h:26: note: 'free_error_list' was declared here

the opkg_utils.h is included at the top, so i don't understand where this error is

i'm working with suse 11.0

i already tried it at a second SUSE 11.0 computer(installed from same source dvd) and i get the same error

logfile of make all is attached

Attachments

log.do_compile.16307 (2.4 KB) - added by manitu 4 years ago.
logfile

Change History

Changed 4 years ago by manitu

logfile

comment:1 Changed 4 years ago by manitu

ah, btw, it is a 64bit SUSE 11.0

comment:2 Changed 4 years ago by tick

  • Status changed from new to accepted

I will take a look about this right now.
Thanks

comment:3 Changed 4 years ago by tick

which gcc version do you use?

comment:4 Changed 4 years ago by manitu

just downloaded newest with yast :X

# gcc --version
gcc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

comment:5 follow-up: ↓ 6 Changed 4 years ago by tick

I think gcc 4.3.1 has this kind of issue. It's issues this warning.
You can turn off the -Werror and I think it will be okay.
I tried gcc 4.3.2-1 on debian x86_64-linux-gnu, opkg is compiled happily.

Index: libopkg/Makefile.am
===================================================================
--- libopkg/Makefile.am (revision 4640)
+++ libopkg/Makefile.am (working copy)
@@ -1,5 +1,5 @@

-AM_CFLAGS=-Wall -Werror -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
+AM_CFLAGS=-Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)

libopkg_includedir=$(includedir)/libopkg
libopkg_include_HEADERS= opkg.h

comment:6 in reply to: ↑ 5 Changed 4 years ago by manitu

Replying to tick:

I think gcc 4.3.1 has this kind of issue. It's issues this warning.
You can turn off the -Werror and I think it will be okay.
I tried gcc 4.3.2-1 on debian x86_64-linux-gnu, opkg is compiled happily.

Index: libopkg/Makefile.am
===================================================================
--- libopkg/Makefile.am (revision 4640)
+++ libopkg/Makefile.am (working copy)
@@ -1,5 +1,5 @@

-AM_CFLAGS=-Wall -Werror -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
+AM_CFLAGS=-Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)

libopkg_includedir=$(includedir)/libopkg
libopkg_include_HEADERS= opkg.h

its not working, same error, got to go offline now, tomorrow i will try to compile gcc without yast, hope it works then :/
if you got any idea, feel free to post it

comment:7 Changed 4 years ago by tick

Yes, this indeed is a bug. Thanks for reporting this.
It was defined as:
In file ./opkg_utils.h
26:void free_error_list();

but the usage becomes
free_error_list(&error_list);
That's wrong.

fix in svn 4844

you can patch the following patch to 4640 as well
commit ba0825094571b051edbf35f8f8bffe02c388d1af
Author: tick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>
Date: Wed Dec 3 15:33:52 2008 +0000

opkg: remove the free_error_list wrong usage bug
Thanks for manitu



git-svn-id: https://svn.openmoko.org/trunk/src/target/opkg@4844 99fdad57-331a-0410-800a-d7fa5415bdb3

diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index cf1cc5d..5b842bd 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -151,7 +151,7 @@ void opkg_print_error_list (opkg_conf_t *conf)

error_list = error_list->next;


}

  • free_error_list(&error_list);

+ free_error_list();

}


}

comment:8 Changed 4 years ago by tick

  • Status changed from accepted to in_testing

If you test okay, please switch to fixed.
If not okay, feel free to reassign to me.
Thanks :-)

Tick

comment:9 Changed 4 years ago by manitu

sorry for write back so late, forgot to send the message:

i tested it all day, once i tried to make update-makefile; make update; make setup; make clean-package-opkg-native; make all;
doesn't working, then same with make image, not working, then with make clean-package-opkg, not working

then i added some empty lines in the file, make clean-package-opkg-native, same error, at same line, it didn't moved down, so it didn't notice the change?

after that i created a new dir and downloaded makefile there, make setup, make image, same error

i already tried it with 8 processes at same time(like in the tips section) and without this change, same error, same line

i also tried the make om-gta02 thing, just same error

i think only thing i didn't try is to change the gcc version, i already tried to install it from the suse dvd, but it was the same version as installed, so i have to look how i can compile my own gcc without losing some of my x services, because they depend on it

but the big question, why it didn't notice the changes in the file and still showed the error at the old line, what commands i need to type, for reloading it(if you know it, i will try to duplicate this free_error_log function and write the second one in opkg_cmd.h/c, so it have to be there)

thanks for the commit of the fix :)

comment:10 Changed 4 years ago by manitu

ah forgot something, the error came up at make image, after make om-gta02 thing, not at make om-gta02 thing

comment:11 Changed 4 years ago by tick

Did you checkout the latest opkg code and compile it directly?
If it does not compile, please post the log.

If it compiles well.
I think you may need to add a patch for your opkg.inc .
Or
modify the sane-srcrevs.inc and prefer opkg-native to 4844

I did not bump up the opkg and opkg-native version in org.openmoko.dev yet. I won't do that until I had verified everything works well in new opkg. (It should)
Maybe you can try it first, it should be faster than 4640. :-)

diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-src
index a8d28b3..5a5147d 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -162,8 +162,8 @@ SRCREV_pn-openmoko-toolchain-scripts ?= "4430"

SRCREV_pn-openmoko-worldclock2 ?= "3365"
SRCREV_pn-openocd ?= "517"
SRCREV_pn-openocd-native ?= "517"

-SRCREV_pn-opkg ?= "4640"
-SRCREV_pn-opkg-native ?= "4640"
+SRCREV_pn-opkg ?= "4844"
+SRCREV_pn-opkg-native ?= "4844"

SRCREV_pn-opkg-sdk ?= "4640"
SRCREV_pn-opkg-utils ?= "4578"
SRCREV_pn-opkg-utils-native ?= "4595"

comment:12 Changed 4 years ago by manitu

if i just change the opkg-native to 4844, this error comes up:
ERROR: Printing the environment of the function
ERROR: Build of /home/werner/openmoko/openembedded/packages/opkg/opkg-native_svn.bb do_patch failed

if i change both, same error, just for opkg.bb :/

comment:13 Changed 4 years ago by manitu

i tried again with both, here the error:

ERROR: Task 316 (/home/werner/openmoko/openembedded/packages/opkg/opkg_svn.bb, do_patch) failed

comment:14 Changed 4 years ago by tick

ah...
4844 already contains the free_error_list(&error_list); patch
so you do not need to patch that again. :-)

comment:15 Changed 4 years ago by xbaldauf

As of now, the changes to conf/distro/include/sane-srcrevs.inc still have not reached http://git.openmoko.org/?p=openmoko.git;a=tree . :-(

comment:16 Changed 4 years ago by manitu

sorry, totally forgot the bug ticket, lucky that i saw my bookmark :)

i tried it now one more time, downloaded newest source, compiled, works fine(i didn't put any patch in)

so i think you can change the status to fixed

Note: See TracTickets for help on using tickets.