openwrt-zipit / openwrt-pxa-target

Zipit Z2 (PXA) target for openwrt
11 stars 3 forks source link

Multiple errors when attempting to reproduce bleeding_edge #4

Open chaseadam opened 3 years ago

chaseadam commented 3 years ago

Thanks for all your work on the Z2 over the years!

I am wondering what you were using for your build environment for your last bleeding edge image and the package repo: https://mozzwald.com/zipit/index.php?dir=openwrt%2Fbleeding_edge%2F

The make defconfig results in patch apply errors for hostapd (the 90X series patches) which is simple enough to just remove them for now (even though that appears to make wpa-supplicant vulnerable to key installation attacks). I think this would be an issue regardless of my build environment.

I am using the clear instructions in this repo with a Fedora 23 container (which contains the compatible GCC version 5.3.1). It is possible this version is not quite right which may be the source of some of my trouble.

But am running into several errors as I attempt to build with your deconfig https://mozzwald.com/zipit/openwrt/bleeding_edge/zipit_openwrt_defconfig_repo:

Werror=format-nonliteral

compiling elfutils when pulling in headers from fortify

modified package/libs/elfutils/Makefile to add from scumvm example:

TARGET_CFLAGS += -Wno-error

CONFIG_PACKAGE_davfs2=m

commented out davfs2 to avoid this error

<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<command-line>:0:0: note: this is the location of the previous definition
webdav.c: In function 'dav_conv_from_utf_8':
webdav.c:589:9: error: 'from_utf_8' undeclared (first use in this function)
     if (from_utf_8)
         ^
webdav.c:589:9: note: each undeclared identifier is reported only once for each function it appears in
webdav.c:590:9: warning: implicit declaration of function 'convert' [-Wimplicit-function-declaration]
         convert(&new, from_utf_8);
         ^
webdav.c: In function 'dav_conv_to_utf_8':
webdav.c:601:9: error: 'to_utf_8' undeclared (first use in this function)
     if (to_utf_8)
         ^
webdav.c: In function 'dav_conv_from_server_enc':
webdav.c:613:9: error: 'from_server_enc' undeclared (first use in this function)
     if (from_server_enc)
         ^
webdav.c: In function 'dav_conv_to_server_enc':
webdav.c:625:9: error: 'to_server_enc' undeclared (first use in this function)
     if (to_server_enc)
         ^
webdav.c: At top level:
webdav.c:1275:19: error: unknown type name 'iconv_t'
 convert(char **s, iconv_t conv)
                   ^
webdav.c: In function 'prop_result':
webdav.c:1898:13: error: 'from_server_enc' undeclared (first use in this function)
         if (from_server_enc)
             ^
In file included from webdav.c:22:0:
webdav.c: At top level:
compat.h:51:15: warning: 'canonicalize_file_name' defined but not used [-Wunused-function]
 static char * canonicalize_file_name(const char *path)
               ^
webdav.c:1546:1: warning: 'log_writer' defined but not used [-Wunused-function]
 log_writer(void *cookie, const char *buffer, size_t size)
 ^
Makefile:423: recipe for target 'webdav.o' failed

git archive uid/gid

fixed by removing

CONFIG_PACKAGE_git=m

CONFIG_PACKAGE_git-http=m

. /root/openwrt-zipit/include/shell.sh; xzcat /root/openwrt-zipit/dl/git-2.8.2.tar.xz | tar -C /root/openwrt-zipit/build_dir/target-arm_xscale_musl-1.1.14_eabi/git-2.8.2/.. -xf - 
tar: git-2.8.2/git.spec: Cannot change ownership to uid 110493, gid 5000: Invalid argument
tar: git-2.8.2/configure: Cannot change ownership to uid 110493, gid 5000: Invalid argument
tar: git-2.8.2/version: Cannot change ownership to uid 110493, gid 5000: Invalid argument
tar: git-2.8.2/git-gui/version: Cannot change ownership to uid 110493, gid 5000: Invalid argument
tar: Exiting with failure status due to previous errors

feeds/packages/libs/gnutls compile

package dependency failed on install of gnutls: libidn.so.11

install -d -m0755 /root/openwrt-zipit/build_dir/target-arm_xscale_musl-1.1.14_eabi/gnutls-3.4.12/ipkg-pxa/libgnutls/usr/lib
cp -fpR /root/openwrt-zipit/build_dir/target-arm_xscale_musl-1.1.14_eabi/gnutls-3.4.12/ipkg-install/usr/lib/libgnutls.so.* /root/openwrt-zipit/build_dir/target-arm_xscale_musl-1.1.14_eabi/gnutls-3.4.12/ipkg-pxa/libgnutls/usr/lib/
find /root/openwrt-zipit/build_dir/target-arm_xscale_musl-1.1.14_eabi/gnutls-3.4.12/ipkg-pxa/libgnutls -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package libgnutls is missing dependencies for the following libraries:
libidn.so.11
Makefile:234: recipe for target '/root/openwrt-zipit/bin/pxa/packages/packages/libgnutls_3.4.12-1_pxa.ipk' failed

and I stalled here to file the issue. Thanks again!

mozzwald commented 3 years ago

I'm surprised you got this far :D When I was building the repo I used Debian 6 or 7 I think, not sure if it would make a difference compared to your Fedora container. The wpa_supplicant problem problem probably just needs an updated patch to match the upstream tarball.

package dependency failed on install of gnutls: libidn.so.11

This should be an easy fix. Find out what package contains libidn.so.11 and add that as a package depends in the gnutls Makefile

You will likely hit more snags.. and then some more ;) good luck