Skip to content

Fixes show build menu sh #2208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ShowBuildMenu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async_generator_path=""

if [ ! -f $BUILD_TOOL_PATH ]
then
dotnet build ./Tools/BuildTool/BuildTool.sln -c Release -o bin
dotnet build ./Tools/BuildTool/BuildTool.sln -c Release -o ./Tools/BuildTool/bin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change causes the binaries to be generated into ./Tools/BuildTool/Tools/BuildTool/bin, which is invalid.
Normally the output is relative to the project file location, not to the command current folder.
In which case would you have it relative to the current folder instead of the project folder?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, if your case really need a fix, better change the current directory to the project one, run the command as it is currently in master, then switch back to the script directory.

Copy link
Contributor Author

@lillo42 lillo42 Sep 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not wired we check one folder and build in other path?
/usr/<some user>/nhibernate-core/Tools/BuildTool/bin/BuildTool.dll
/usr/<some user>/nhibernate-core/bin

When I ran ShowBuildMenu.sh I got this error:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-./Tools/BuildTool/bin/BuildTool.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-./Tools/BuildTool/bin/BuildTool.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
cat: /home/<user>/nhibernate-core/folder.tmp: No such file or directory
cp: cannot access '/lost+found': Permission denied
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/agpgart': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/audio': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/audio1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/audio2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/audio3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/audioctl': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/console': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/dsp': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/dsp1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/dsp2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/dsp3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/full': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/kmem': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop4': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop5': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop6': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/loop7': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mem': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi00': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi01': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi02': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi03': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/midi3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mixer': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mixer1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mixer2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mixer3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mpu401data': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/mpu401stat': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/null': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/port': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram10': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram11': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram12': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram13': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram14': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram15': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram16': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram4': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram5': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram6': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram7': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram8': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/ram9': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/random': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/rmidi0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/rmidi1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/rmidi2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/rmidi3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/sequencer': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/smpte0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/smpte1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/smpte2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/smpte3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/sndstat': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty0': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty1': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty2': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty3': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty4': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty5': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty6': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty7': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty8': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/tty9': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/urandom': Operation not permitted
cp: cannot create special file './current-test-configuration/snap/core/7713/dev/zero': Operation not permitted
cp: cannot open '/snap/core/7713/etc/.pwd.lock' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/gshadow' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/ppp/chap-secrets' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/ppp/pap-secrets' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/security/opasswd' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/shadow' for reading: Permission denied
cp: cannot access '/snap/core/7713/etc/ssl/private': Permission denied
cp: cannot open '/snap/core/7713/etc/sudoers' for reading: Permission denied
cp: cannot open '/snap/core/7713/etc/sudoers.d/README' for reading: Permission denied
^Xcp: cannot access '/snap/core/7713/root': Permission denied

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not building in another path that the one checked. Re-read my first-comment.

Normally the output is relative to the project file location, not to the command current folder.

The project file is located into ./Tools/BuildTool/, so the bin output folder is created into ./Tools/BuildTool/ by the dotnet command. It works this way with my Debian setup. (dotnet --version was outputing 2.1.403 on my setup, but just incase, I have updated it, and with 2.2.204, it is still working.) By the way, it works the same under Windows with the .bat version.

For now it seems to be only on your setup that it does not work, if that bin does land somewhere else on your device.

And your proposed fix breaks regular setup. It cannot be accepted.

This change causes the binaries to be generated into ./Tools/BuildTool/Tools/BuildTool/bin, which is invalid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other word you are attempting to fix an issue that we cannot reproduce, and you fix it in a way that causes more issues.
If there is actually anything to fix in that script, you will have to prove it first by supplying enough information for allowing someone else than you to reproduce the issue.

Copy link
Member

@bahusoid bahusoid Sep 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You intended to execute a .NET Core program, but dotnet-./Tools/BuildTool/bin/BuildTool.dll does not exist.

Path is suspiciously prefixed with "dotnet-"

Copy link
Member

@hazzik hazzik Sep 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have faced this myself. The problem is when you run the menu not within the same path (eg not ./ShowBuildMenu.sh, but ./something/ShowBuildMenu.sh). Then it tries to copy root folder (/ - whole file system) into the current-test-configuration folder).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this often happens when I run ShowBuildMenu.sh from ./src folder (so I run it like ../ShowBuildMenu.sh).

fi

buildDebug(){
Expand Down