PK70 Factory Demo Build Failure

Discussion to talk about software related topics only.
Post Reply
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

PK70 Factory Demo Build Failure

Post by mike »

This question is probably easy for someone. Hopefully they can help me save time.

I just installed version 2.8.7 (MS-WIndows XP) with two hardware platform licenses (MOD5441x and PK70).
I rebuilt the system files (it defaulted to the other hardware platform: MOD5441x).
Using a command window I went to "nburn\PK70\system" and ran make.
In Eclipse, created a new PK70 project.
Copied the contents of "nburn\examples\PK70\PK70FactoryDemo" into my new project.
Refreshed the project pane.
Tried to do a 'clean and build' of this new project.
I get the following errors, which stops the build:
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartInfoReq()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:821: undefined reference to `GetRandomDword()'
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartSolicit()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:832: undefined reference to `GetRandomDword()'

Any ideas of how I fix this ??
User avatar
TomNB
Posts: 538
Joined: Tue May 10, 2016 8:22 am

Re: PK70 Factory Demo Build Failure

Post by TomNB »

Can you verify you did not install 2.8.7 over an existing installation? An easy way to do this is to simply rename your current \nburn install to something else, like \nburn2p7p7 or whatever the release number was.

Try using the app wizard to make a simple project and see if that builds. When putting files in a project you should right-click on the project and use the import feature to import just the source files.
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 Factory Demo Build Failure

Post by mike »

I renamed my existing installation to "Netburner_277".
Then I did a clean install of 2.8.7
I also created a MOD5441x project (and copied my source files). That project compiled properly under 2.7.7. When I tried to compile it under 2.8.7 it resulted in the exact same two errors.
Later tonight I'll remove both of those projects and 'properly' import them and see what happens.
I'll post what I find. Thank you for your help.
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 Factory Demo Build Failure

Post by mike »

I deleted the PK70 project.
I created a new (empty) PK70 project. Imported the factory demo. Tried to build the project. Exact same results.
Doubtful this will help, but here is the Build Console listing (complete). The errors are near the bottom of the listing, they stopped the build.
Your help is appreciated.

**** Rebuild of configuration Release for project avt-440_factory2 ****

**** Internal Builder is used for build ****
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\avt-440_factory2 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o ftps.o ..\ftps.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\avt-440_factory2 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o webfuncs.o ..\webfuncs.cpp
comphtml ../html -ohtmldata.cpp
Reading files from ../html and compressing them into htmldata.cpp
Ignoring files and directories: CVS, cvs, .SVN, .svn, .git, .GIT
MIME_file: C:\_D_drive\Netburner/pcbin/MIME_magic.txt

Building MIME list..... Done
Processing /dynamicweb.htm 9050 bytes
Processing /ftp.htm 5048 bytes
Processing /images/blank.gif 124 bytes
Processing /images/cross.gif 157 bytes
Processing /images/led_green40x40.gif 592 bytes
Processing /images/led_off40x40.gif 443 bytes
Processing /images/led_red40x40.gif 592 bytes
Processing /images/linkbullet9x9.jpg 836 bytes
Processing /images/netburnerlogo200x93.gif 2550 bytes
Processing /images/not.gif 955 bytes
Processing /images/pk70ex320x226.png 59285 bytes
Processing /images/pk70ex400x282.jpg 16725 bytes
Processing /index.htm
New function DisplayFirmwareVersion # 1
4819 bytes
Processing /led.htm
New function WebLeds # 2
3743 bytes
Processing /robots.txt 27 bytes
Processing /support.htm 4027 bytes
Processing /tt.htm
New function WebTickTacToe # 3
4991 bytes
Result counts = 249 total_ends :125
15173 bytes out of 28884 original encode out of 113964 total original
Processing /dynamicweb.htm 9050 bytes
Processing /ftp.htm 5048 bytes
Processing /images/blank.gif 124 bytes
Processing /images/cross.gif 157 bytes
Processing /images/led_green40x40.gif 592 bytes
Processing /images/led_off40x40.gif 443 bytes
Processing /images/led_red40x40.gif 592 bytes
Processing /images/linkbullet9x9.jpg 836 bytes
Processing /images/netburnerlogo200x93.gif 2550 bytes
Processing /images/not.gif 955 bytes
Processing /images/pk70ex320x226.png 59285 bytes
Processing /images/pk70ex400x282.jpg 16725 bytes
Processing /index.htm
Found function DisplayFirmwareVersion # 1
4819 bytes
Processing /led.htm
Found function WebLeds # 2
3743 bytes
Processing /robots.txt 27 bytes
Processing /support.htm 4027 bytes
Processing /tt.htm
Found function WebTickTacToe # 3
4991 bytes
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\avt-440_factory2 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o htmldata.o htmldata.cpp
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\avt-440_factory2 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o main.o ..\main.cpp
m68k-elf-g++ webfuncs.o main.o ftps.o htmldata.o -Wl,-Map=avt-440_factory2.map -mcpu=5270 -Wl,-n -TC:\_D_drive\Netburner/PK70/lib/PK70.ld -Wl,-RC:\_D_drive\Netburner/PK70/lib/sys.ld -Wl,--start-group,C:\_D_drive\Netburner/lib/PK70.a C:\_D_drive\Netburner/lib/NetBurner.a C:\_D_drive\Netburner/lib/FatFile.a -lstdc++ C:\_D_drive\Netburner\lib\cryptolib.a C:\_D_drive\Netburner\lib\debugLibrary.a C:\_D_drive\Netburner\lib\Lua_Full.a C:\_D_drive\Netburner\lib\nb-libxively.a C:\_D_drive\Netburner\lib\nbwifilib.a C:\_D_drive\Netburner\lib\webclient.a -Wl,--end-group -Wl,--gc-sections -oavt-440_factory2.elf
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartInfoReq()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:821: undefined reference to `GetRandomDword()'
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartSolicit()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:832: undefined reference to `GetRandomDword()'
collect2.exe: error: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 10578 ms.
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 Factory Demo Build Failure

Post by mike »

Experiment #2.
I used the wizard to create a project, I checked "AutoUpdate", "Webserver" and "Stack Check".
Only one source file in the project (main.cpp). Contents:
----------
#include <predef.h>
#include <stdio.h>
#include <ctype.h>
#include <startnet.h>
#include <autoupdate.h>


extern "C" {
void UserMain(void * pd);
}

const char * AppName="wizard_01";

void UserMain(void * pd) {
InitializeStack();
OSChangePrio(MAIN_PRIO);
EnableAutoUpdate();
StartHTTP();


iprintf("Application started\n");
while (1) {
OSTimeDly(TICKS_PER_SECOND);
}
}
----------
Tried to build the project. Same two errors.
Build Console output:

**** Rebuild of configuration Release for project wizard_01 ****

**** Internal Builder is used for build ****
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\wizard_01 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o main.o ..\main.cpp
comphtml ../html -ohtmldata.cpp
Reading files from ../html and compressing them into htmldata.cpp
Ignoring files and directories: CVS, cvs, .SVN, .svn, .git, .GIT
MIME_file: C:\_D_drive\Netburner/pcbin/MIME_magic.txt

Building MIME list..... Done
Processing /index.htm 76 bytes
Result counts = 61 total_ends :31
34 bytes out of 59 original encode out of 76 total original
Processing /index.htm 76 bytes
m68k-elf-g++ -O2 -falign-functions=4 -IC:\_D_drive\Netburner/include -IC:\_D_drive\Netburner/PK70/include -IC:\_D_drive\Netburner/gcc-m68k/m68k-unknown-elf/include -IC:\_D_drive\Netburner\workspace\wizard_01 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -fno-rtti -fno-exceptions -mcpu=5270 -DPK70 -DMCF5270 -fdata-sections -ffunction-sections -std=gnu++14 -o htmldata.o htmldata.cpp
m68k-elf-g++ main.o htmldata.o -Wl,-Map=wizard_01.map -mcpu=5270 -Wl,-n -TC:\_D_drive\Netburner/PK70/lib/PK70.ld -Wl,-RC:\_D_drive\Netburner/PK70/lib/sys.ld -Wl,--start-group,C:\_D_drive\Netburner/lib/PK70.a C:\_D_drive\Netburner/lib/NetBurner.a C:\_D_drive\Netburner/lib/FatFile.a -lstdc++ C:\_D_drive\Netburner\lib\cryptolib.a C:\_D_drive\Netburner\lib\debugLibrary.a C:\_D_drive\Netburner\lib\Lua_Full.a C:\_D_drive\Netburner\lib\nb-libxively.a C:\_D_drive\Netburner\lib\nbwifilib.a C:\_D_drive\Netburner\lib\webclient.a -Wl,--end-group -Wl,--gc-sections -owizard_01.elf
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartInfoReq()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:821: undefined reference to `GetRandomDword()'
C:\_D_drive\Netburner/lib/NetBurner.a(ipv6_dhcp.o): In function `NB::V6::DHCPv6::DHCPClient::StartSolicit()':
C:\_D_drive\Netburner\system/ipv6/ipv6_dhcp.cpp:832: undefined reference to `GetRandomDword()'
collect2.exe: error: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 4656 ms.
----------

Should I try to rebuild the system files using a command window, while in "\Netburner\system" directory.
Instead of using the NBEclipse | Rebuild All System Files menu option.
Would that help ??
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 Factory Demo Build Failure

Post by mike »

I removed "Dual Stack Mode" and went to IPv4 only by modifying the "predef.h" file, per the instructions in "IPv6DualStackMode.pdf".
I rebuilt the system files, the libraries, and all system files for each platform (all from the command prompt).
I can now build all the projects without problems.
No IPv6, but at least I can move on (with IPv4).
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 Factory Demo Build Failure

Post by mike »

I just found the problem - and it is me.
I had commented out "GATHER_RANDOM" in "predef.h"; and forgot that I had done that.
I have not un-commented that line and rebuilt all the system files, yet. But I'm sure that will fix the problem.
Sorry to have wasted your time. (You are welcome to delete this entire post.)
User avatar
Jon
Posts: 79
Joined: Mon Feb 05, 2018 10:54 am

Re: PK70 Factory Demo Build Failure

Post by Jon »

No worries at all, Mike. We are glad you found the problem. =)

Kind Regards,
Jon
Post Reply