Skip to content

Premake5 trying to include /usr/bin/bitmap instead of folder with premake5 script #1783

@dankmolot

Description

@dankmolot

What seems to be the problem?

Premake5 5.0-beta1 tries to include /usr/bin/bitmap instead of folder with premake5 script.
This is because premake5 is located in /usr/bin.
Here is result:

$ premake5 gmake --gmcommon="$HOME/garrysmod_common"
Selected version 3 of the project generator
Error: /usr/bin/bitmap:1: unexpected symbol near '<\127>'

What did you expect to happen?

Expected successful building of configuration.

What have you tried so far?

Renamed bitmap binary, so premake5 can't find it:

$ sudo mv /usr/bin/bitmap /usr/bin/bitmap.old
$ premake5 gmake --gmcommon="$HOME/garrysmod_common"
Selected version 3 of the project generator
Building configurations...
Running action 'gmake'...
Generated projects/linux/gmake/Makefile...
Generated projects/linux/gmake/gmsv_network.make...
Done (684ms).

Tried use locally located premake5

$ ./premake5 gmake --gmcommon="$HOME/garrysmod_common"
Selected version 3 of the project generator
Building configurations...
Running action 'gmake'...
Generated projects/linux/gmake/Makefile...
Generated projects/linux/gmake/gmsv_network.make...
Done (650ms).

How can we reproduce this?

Place premake5 at /usr/bin

$ cp ./premake5 /usr/bin/

Creating project with bitmap folder

-- premake5.lua
print('Including bitmap')
include('bitmap')

-- bitmap/premake5.lua
print('Hello from bitmap!')

Place premake5 to /usr/bin and build configuration

$ premake5 gmake
Including bitmap
Error: /usr/bin/bitmap:1: unexpected symbol near '<\127>'

What version of Premake are you using?

Premake 5.0-beta1 from releases

Anything else we should know?

Premake5 was running on debian 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions