#6698 closed defect (wontfix)

Premake doesn't invalidate targets after changing defines

Reported by: Stan Owned by: Itms
Priority: Should Have Milestone:
Component: Build & Packages Keywords:
Cc: Patch:

Description (last modified by Stan)

To reproduce. On linux or macOS run update-workspaces.sh --without-upnpc AFTER BUILDING NETWORK.

<built-in>:1:9: warning: 'CONFIG2_MINIUPNPC' macro redefined [-Wmacro-redefined]
#define CONFIG2_MINIUPNPC 0
        ^
/Users/stan/0ad-svn/build/workspaces/gcc/../../../source/lib/config2.h:86:10: note: previous definition is here
# define CONFIG2_MINIUPNPC 1
         ^
1 warning generated.
Undefined symbols for architecture arm64:
  "_FreeUPNPUrls", referenced from:
      std::__1::__function::__func<CNetServerWorker::SetupUPnP()::$_0, std::__1::allocator<CNetServerWorker::SetupUPnP()::$_0>, void ()>::operator()() in libnetwork.a(NetServer.o)
  "_UPNP_AddPortMapping", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_UPNP_GetExternalIPAddress", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_UPNP_GetIGDFromUrl", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_UPNP_GetSpecificPortMappingEntry", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_UPNP_GetValidIGD", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_freeUPNPDevlist", referenced from:
      std::__1::__function::__func<CNetServerWorker::SetupUPnP()::$_0, std::__1::allocator<CNetServerWorker::SetupUPnP()::$_0>, void ()>::operator()() in libnetwork.a(NetServer.o)
  "_strupnperror", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
  "_upnpDiscover", referenced from:
      CNetServerWorker::SetupUPnP() in libnetwork.a(NetServer.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../../../binaries/system/pyrogenesis] Error 1
make: *** [pyrogenesis] Error 2

Change History (3)

comment:1 by Itms, 15 months ago

Description: modified (diff)
Owner: set to Itms

comment:2 by Stan, 15 months ago

Description: modified (diff)
Summary: --without-miniupnpc is brokenPremake doesn't invalidate targets after changing defines

comment:3 by Itms, 15 months ago

Milestone: Alpha 27
Resolution: wontfix
Status: newclosed

When changing defines in premake, the user should expect this kind of build failures. The easiest fix is to delete then generate the workspace again.

Note: See TracTickets for help on using tickets.