Skip to content
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

Problem with loading ez files at start of erlang (OTP 27 rc2) #8355

Closed
sailingareus opened this issue Apr 8, 2024 · 2 comments
Closed

Problem with loading ez files at start of erlang (OTP 27 rc2) #8355

sailingareus opened this issue Apr 8, 2024 · 2 comments
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@sailingareus
Copy link

sailingareus commented Apr 8, 2024

Describe the bug
Erlang can not load ez files correctly when starting in OTP 27 RC2 via a boot file so there seams to possibly be something wrong with the code loading or a change of behaviour (not sure which) adding the internal path to the "ebin" directory seams make thing working i.e. "-pa lib/foobar.ez/foobar/ebin"

The Erlang VM fails to startup

erl -boot ~/eztestbed/boot/start_clean -boot_var MY_ROOT ~/eztestbed
"Internal error: Terminated in boot
({load_failed,[supervisor,lists,logger_config,

The Erlang VM start with adding the argument -pa

cwillia4@kupaklint:~/eztestbed$ erl -boot ~/eztestbed/boot/start_clean -boot_var MY_ROOT ~/eztestbed -pa ~/eztestbed/lib/kernel.ez/kernel/ebin -pa ~/eztestbed/lib/stdlib.ez/stdlib/ebin
Erlang/OTP 27 [RELEASE CANDIDATE 2] [erts-14.3] [source-bd62120713] [64-bit] [sm
p:8:8] [ds:8:8:10] [async-threads:1]

Eshell V14.3 (press Ctrl+G to abort, type help(). for help)
1>

To Reproduce
Included is a minimal reproduction
eztestbed.tar.gz

Expected behavior
The Erlang VM starts up from ez files using a boot script without needining to add additional paths via pa or pz to start

Affected versions
The OTP 27 rc1 and rc2 it works fine in older version like OTP 25 and 26

Additional information
We know that creation of archive support was removed in OTP 26 from reltool but are aslo interested to know if it was a conscious decision to remove the loading of them. If so possibly what commit was it removed?

So we can get OTP 27 working and of course slowly remove the use of the archives.

Regards
Chris W.

@sailingareus sailingareus added the bug Issue is reported as a bug label Apr 8, 2024
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Apr 8, 2024
@bjorng
Copy link
Contributor

bjorng commented Apr 8, 2024

It will work if you add -code_path_choice relaxed to the command line:

erl -code_path_choice relaxed -boot ~/eztestbed/boot/start_clean -boot_var MY_ROOT ~/eztestbed

The default for -code_path_choice has changed to strict in Erlang/OTP 27. This was done in #7243. This was mentioned in a release note (OTP-18894 for the Erts application). I will update the release note for the next release candidate to make it clearer that you'll need to use this option if you are using archives.

@bjorng bjorng closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2024
@sailingareus
Copy link
Author

Tack,
That solves the problem

Regards
Chris Williams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

3 participants