After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791927 - Using '#!/usr/bin/perl' in scripts is not portable
Using '#!/usr/bin/perl' in scripts is not portable
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Broadway
3.92.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-12-24 16:23 UTC by Ting-Wei Lan
Modified: 2017-12-25 04:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk/broadway/toarray.pl: Don't hard-code the path of perl (651 bytes, patch)
2017-12-24 16:25 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2017-12-24 16:23:11 UTC
gdk/broadway/toarray.pl hard-codes the path to perl by using '#!/usr/bin/perl -w', which won't work on FreeBSD because perl is not part of the base system and cannot be installed in /usr/bin.

[1/1265] Generating clienthtml.h with a meson_exe.py custom command.
FAILED: gdk/broadway/clienthtml.h
/usr/local/bin/python3 /home/lantw44/gnome/devinstall/bin/meson --internal exe /home/lantw44/gnome/build/gtk+/meson-private/meson_exe_toarray.pl_0427a21cf428aa92ea814428487b41eff9ccfdb5.dat
Traceback (most recent call last):
  • File "/home/lantw44/gnome/devinstall/bin/meson", line 37 in <module>
    sys.exit(main())
  • File "/home/lantw44/gnome/devinstall/bin/meson", line 34 in main
    return mesonmain.run(sys.argv[1:], launcher)
  • File "/home/lantw44/gnome/devinstall/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 311 in run
    sys.exit(run_script_command(args[1:]))
  • File "/home/lantw44/gnome/devinstall/lib/python3.6/site-packages/mesonbuild/mesonmain.py", line 278 in run_script_command
    return cmdfunc(cmdargs)
  • File "/home/lantw44/gnome/devinstall/lib/python3.6/site-packages/mesonbuild/scripts/meson_exe.py", line 76 in run
    return run_exe(exe)
  • File "/home/lantw44/gnome/devinstall/lib/python3.6/site-packages/mesonbuild/scripts/meson_exe.py", line 59 in run_exe
    p, stdout, stderr = Popen_safe(cmd + exe.cmd_args, env=child_env, cwd=exe.workdir)
  • File "/home/lantw44/gnome/devinstall/lib/python3.6/site-packages/mesonbuild/mesonlib.py", line 548 in Popen_safe
    stderr=stderr, **kwargs)
  • File "/usr/local/lib/python3.6/subprocess.py", line 709 in __init__
    restore_signals, start_new_session)
  • File "/usr/local/lib/python3.6/subprocess.py", line 1344 in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/lantw44/gnome/source/gtk+/gdk/broadway/toarray.pl': '/home/lantw44/gnome/source/gtk+/gdk/broadway/toarray.pl'
ninja: build stopped: subcommand failed.
Comment 1 Ting-Wei Lan 2017-12-24 16:25:09 UTC
Created attachment 365940 [details] [review]
gdk/broadway/toarray.pl: Don't hard-code the path of perl
Comment 2 Emmanuele Bassi (:ebassi) 2017-12-24 18:43:20 UTC
Review of attachment 365940 [details] [review]:

Looks good to me, and it's in line with the other scripts.

Of course, I'd also accept a rewrite of the script in Python ;-)
Comment 3 Ting-Wei Lan 2017-12-25 04:27:41 UTC
Attachment 365940 [details] pushed as 5f8e2fc - gdk/broadway/toarray.pl: Don't hard-code the path of perl