aejsmith / vkdevicechooser

Vulkan layer to force a specific device to be used
MIT License
77 stars 18 forks source link

Aur buildtime error #8

Closed plasticbomb1986 closed 4 years ago

plasticbomb1986 commented 4 years ago

When installing from aur:

g++ -gdwarf-2 -shared -O2 -fPIC -std=gnu++11 layer.cpp -o libVkLayer_device_chooser.so
layer.cpp: In function ‘VkResult ChooseDevice(VkInstance, const VkLayerInstanceDispatchTable&, const char*, VkPhysicalDevice_T*&)’:
layer.cpp:65:23: error: ‘atoi’ was not declared in this scope
   65 |     int deviceIndex = atoi(env);
      |                       ^~~~
layer.cpp: In function ‘VkResult DeviceChooserLayer_EnumeratePhysicalDevices(VkInstance, uint32_t*, VkPhysicalDevice_T**)’:
layer.cpp:88:29: error: ‘getenv’ was not declared in this scope
   88 |     const char* const env = getenv(kEnvVariable);
      |                             ^~~~~~
layer.cpp: In function ‘VkResult DeviceChooserLayer_EnumeratePhysicalDeviceGroupsKHR(VkInstance, uint32_t*, VkPhysicalDeviceGroupPropertiesKHR*)’:
layer.cpp:125:29: error: ‘getenv’ was not declared in this scope
  125 |     const char* const env = getenv(kEnvVariable);
      |                             ^~~~~~
make: *** [Makefile:4: libVkLayer_device_chooser.so] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
Error making: vkdevicechooser

Arch Linux Kernel 5.7 Mesa-20.1.0

aejsmith commented 4 years ago

Fixed by 88c537afade9043ac25cd20d23d81b542adf7b5a.