Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fresh Git version - undefined reference to `vlan_find'
2020-04-19, 23:48 (This post was last modified: 2020-04-20 00:03 by cpservicespb.)
Post: #1
Fresh Git version - undefined reference to `vlan_find'
Error is appeared during build the freshest git version:
Code:
[code]ranlib bin/blib.a
ld  -m elf_i386 -N --no-check-sections --section-start=.prefix=0   --gc-sections -static -T arch/x86/scripts/pcbios.lds  -u _pcirom_start --defsym check__pcirom_start=_pcirom_start   -u obj_intel --defsym check_obj_intel=obj_intel   -u pci_devlist_8086100e --defsym check_pci_devlist_8086100e=pci_devlist_8086100e   -u obj_config --defsym check_obj_config=obj_config   -u obj_config_pcbios --defsym check_obj_config_pcbios=obj_config_pcbios  --defsym pci_vendor_id=0x8086 --defsym pci_device_id=0x100e -e _pcirom_start bin/version.82540em.rom.o bin/blib.a -o bin/82540em.rom.tmp \
        --defsym _build_id=`perl -e 'printf "0x%08x", int ( rand ( 0xffffffff ) );'` \
        --defsym _build_timestamp=1587336334 \
        -Map bin/82540em.rom.tmp.map
bin/blib.a(netdevice.o): In function `net_pull_tags':
/home/gateadmin/files/soft/pxe/ipxe/tmp/ipxe_1.0.0+git-20200420/src/net/netdevice.c:1072: undefined reference to `vlan_find'
Makefile.housekeeping:1191: recipe for target 'bin/82540em.rom.tmp' failed
make[2]: *** [bin/82540em.rom.tmp] Error 1
rm bin/version.82540em.rom.o
make[2]: Leaving directory '/home/gateadmin/files/soft/pxe/ipxe/tmp/ipxe_1.0.0+git-20200420/src'
dh_auto_build: cd src && make -j8 V=1 NO_WERROR=1 VERSION=1.0.0\+git-20190109.133f4c4-0ubuntu2-my bin/82540em.rom returned exit code 2
debian/rules:37: recipe for target 'src/bin/82540em.rom' failed
make[1]: *** [src/bin/82540em.rom] Error 2
make[1]: Leaving directory '/home/gateadmin/files/soft/pxe/ipxe/tmp/ipxe_1.0.0+git-20200420'
debian/rules:12: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
[/code]

I saw in netdevice.c of Git version from Aug, 08, 19.
There is
Code:
/**
* Identify VLAN device (when VLAN support is not present)
*
* @v trunk                    Trunk network device
* @v tag                      VLAN tag
* @ret netdev               VLAN device, if any
*/
__weak struct net_device * vlan_find ( struct net_device *trunk __unused,
                                                      unsigned int tag __unused ) {
            return NULL;
}

But there is no such fiunction sceleton in netdevice.c of freshest Git version.

But there is in vlan.c file.

What is incorrect ?
Find all posts by this user
Quote this message in a reply
2020-04-20, 23:45
Post: #2
RE: Fresh Git version - undefined reference to `vlan_find'
I almoste resolved the issue by my own.
Find all posts by this user
Quote this message in a reply
2020-04-21, 02:01
Post: #3
RE: Fresh Git version - undefined reference to `vlan_find'
There are links where attempting to do "Strip 802.1Q VLAN 0 priority tags" so is represented.
Moreover there is the patch in Debian rules for building iPXE deb package for Ubuntu.

Both links I think almost the same.
Link1: https://lists.ipxe.org/pipermail/ipxe-de...05099.html
Link2: https://code.launchpad.net/~paelzer/ubun...rge/360679

I made additionally investigation and for freshest git version there are 2 changes are required more:
vlan.c = remove static for <vlan_find> function;

was
Code:
static struct net_device * vlan_find ( struct net_device *trunk,
                                            unsigned int tag ) {
became:
Code:
struct net_device * vlan_find ( struct net_device *trunk,
                                            unsigned int tag ) {

vlan.h = define as extern <vlan_find> function;
add
Code:
extern struct net_device * vlan_find ( struct net_device *trunk,
                                            unsigned int tag ) ;

Otherwise error for vlan_find unrecognized symbol will be got during ld stage.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)