Fslbuild.py error:/usr/bin/env: ‘python3\r’: No such file or directory

cancel
Showing results for 
Search instead for 
Did you mean: 

Fslbuild.py error:/usr/bin/env: ‘python3\r’: No such file or directory

Jump to solution
991 Views
josephzhou1
Contributor V

I fellow fully the steps  to build gtec-demo-framework but cant , error come out in the last step :

        3.Build and the application.

FslBuild.py --Variants [WindowSystem=FB]
 

WindowSystem can bet set to either FB, Wayland, Wayland_IVI, X11 be sure to pick the right one. If the app doesn't require a WindowSystem the --Variants [WindowSystem=FB]can be omitted.

1

how can  i build it pls ?

2

BTW how come NXP  not have Xwayland Distro here , but yocto build got Xwayland very confuse leh??

3

also here you guys use -e  not Distro , why not the same ???

4sceen shot 

imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ ls
CONTRIBUTING.md DemoApps DemoFramework Doc FslBuildGen.xsd KnownIssues.md License.md Licenses prepare.bat prepare.sh Project.gen README.md Resources TexturePackerConfig.xml ThirdParty
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ cd DemoApps
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps$ ls
Console G2D GLES2 GLES3 OpenCL OpenCV OpenVG OpenVX Shared Vulkan Window
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps$ cd ..
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ ls
CONTRIBUTING.md DemoApps DemoFramework Doc FslBuildGen.xsd KnownIssues.md License.md Licenses prepare.bat prepare.sh Project.gen README.md Resources TexturePackerConfig.xml ThirdParty
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ source prepare.sh
PlatformName: Yocto
WARNING: Environment variable FSL_GRAPHICS_SDK_THIRD_PARTY_LIBS_DIR was not defined, so we force defined it.
Its highly recommended to manually define this variable so you can reuse the thirdparty libs between builds and repositories.
Read DocBuildingExternals.md for detailed information about this environment variable.
FSL_GRAPHICS_SDK=/media/sf_shared/gtec-demo-framework
FSL_GRAPHICS_SDK_ANDROID_PROJECT_DIR=/media/sf_shared/gtec-demo-framework/Android
FSL_GRAPHICS_SDK_THIRD_PARTY_LIBS_DIR=/media/sf_shared/gtec-demo-framework/.Thirdparty
ROOTFS=/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa35-poky-linux
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ cd DemoApps
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps$ ls
Console G2D GLES2 GLES3 OpenCL OpenCV OpenVG OpenVX Shared Vulkan Window
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps$ cd GLES2
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps/GLES2$ ls
Bloom DirectMultiSamplingVideoYUV LineBuilder101 OpenCV101 S03_Transform S06_Texturing S09_VIV_direct_texture System UI
Blur EightLayerBlend ModelLoaderBasics S01_SimpleTriangle S04_Projection S07_EnvMapping SdfFonts T3DStressTest VIVDirectTextureMultiSampling
DeBayer FractalShader ModelViewer S02_ColoredTriangle S05_PrecompiledShader S08_EnvMappingRefraction Stats TextureCompression
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps/GLES2$ cd S04_Projection
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps/GLES2/S04_Projection$ ls
Content Example.jpg Fsl.gen README.md source
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework/DemoApps/GLES2/S04_Projection$ FslBuild.py --Variants [WindowSystem=Wayland]
/usr/bin/env: ‘python3\r’: No such file or directory

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
1 Solution
924 Views
josephzhou1
Contributor V

hi all

1

I HAVE FELLOWED RENE'S WAY (git clone the repo in Ubuntu only ), to build it successfully and scp it binary to imx8 target , it is great , it can be run. thanks rene

2

but ,

it is still some warnings come out , it is not 100% see belows, please advices why it is happened and how to overcome it to make it 100%, i thanks AS NXP also wanto to be 100% rite?

3

thanks anyway.

 

joseph zhou jian hui

 

-----------------------------------

 

imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$ FslBuild.py --Variants [WindowSystem=Wayland]
/home/imx8/gtec-demo-framework/DemoApps/GLES2/S04_Projection/Fsl.gen
-- Using CMAKE_PREFIX_PATH:
-- Toolchain file defaulted to '/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake'
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/imx8/gtec-demo-framework/build/Yocto/Ninja/release
[303/363] Building CXX object DemoFramework/FslNativeWindow/Platform/CMakeFiles/FslNativeWindow.Plat...k/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp.o
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::frame’ [-Wmissing-field-initializers]
471 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_source’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_stop’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_discrete’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:642:5: warning: missing initializer for member ‘wl_keyboard_listener::repeat_info’ [-Wmissing-field-initializers]
642 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:909:5: warning: missing initializer for member ‘wl_seat_listener::name’ [-Wmissing-field-initializers]
909 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:851:17: warning: ‘void Fsl::{anonymous}::print_infos(wl_list*)’ defined but not used [-Wunused-function]
851 | static void print_infos(struct wl_list* infos)
| ^~~~~~~~~~~
[363/363] Linking CXX executable DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland
Run command: 'FslBuildRun.py'
- Executable at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland'
- Exe CWD at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection'
imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$

 

 

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore

View solution in original post

0 Kudos
8 Replies
564 Views
josephzhou1
Contributor V

hi all

1

I HAVE FELLOWED RENE'S WAY (git clone the repo in Ubuntu only ), to build it successfully and scp it binary to imx8 target , it is great , it can be run. thanks rene

2

but ,

it is still some warnings come out , it is not 100% see belows, please advices why it is happened and how to overcome it to make it 100%, i thanks AS NXP also wanto to be 100% rite?

3

thanks anyway.

 

joseph zhou jian hui

 

-----------------------------------

 

imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$ FslBuild.py --Variants [WindowSystem=Wayland]
/home/imx8/gtec-demo-framework/DemoApps/GLES2/S04_Projection/Fsl.gen
-- Using CMAKE_PREFIX_PATH:
-- Toolchain file defaulted to '/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake'
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/imx8/gtec-demo-framework/build/Yocto/Ninja/release
[303/363] Building CXX object DemoFramework/FslNativeWindow/Platform/CMakeFiles/FslNativeWindow.Plat...k/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp.o
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::frame’ [-Wmissing-field-initializers]
471 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_source’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_stop’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_discrete’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:642:5: warning: missing initializer for member ‘wl_keyboard_listener::repeat_info’ [-Wmissing-field-initializers]
642 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:909:5: warning: missing initializer for member ‘wl_seat_listener::name’ [-Wmissing-field-initializers]
909 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:851:17: warning: ‘void Fsl::{anonymous}::print_infos(wl_list*)’ defined but not used [-Wunused-function]
851 | static void print_infos(struct wl_list* infos)
| ^~~~~~~~~~~
[363/363] Linking CXX executable DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland
Run command: 'FslBuildRun.py'
- Executable at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland'
- Exe CWD at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection'
imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$

 

 

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
925 Views
josephzhou1
Contributor V

hi all

1

I HAVE FELLOWED RENE'S WAY (git clone the repo in Ubuntu only ), to build it successfully and scp it binary to imx8 target , it is great , it can be run. thanks rene

2

but ,

it is still some warnings come out , it is not 100% see belows, please advices why it is happened and how to overcome it to make it 100%, i thanks AS NXP also wanto to be 100% rite?

3

thanks anyway.

 

joseph zhou jian hui

 

-----------------------------------

 

imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$ FslBuild.py --Variants [WindowSystem=Wayland]
/home/imx8/gtec-demo-framework/DemoApps/GLES2/S04_Projection/Fsl.gen
-- Using CMAKE_PREFIX_PATH:
-- Toolchain file defaulted to '/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake'
-- The CXX compiler identification is GNU 10.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/imx8/gtec-demo-framework/build/Yocto/Ninja/release
[303/363] Building CXX object DemoFramework/FslNativeWindow/Platform/CMakeFiles/FslNativeWindow.Plat...k/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp.o
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::frame’ [-Wmissing-field-initializers]
471 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_source’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_stop’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:471:5: warning: missing initializer for member ‘wl_pointer_listener::axis_discrete’ [-Wmissing-field-initializers]
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:642:5: warning: missing initializer for member ‘wl_keyboard_listener::repeat_info’ [-Wmissing-field-initializers]
642 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:909:5: warning: missing initializer for member ‘wl_seat_listener::name’ [-Wmissing-field-initializers]
909 | };
| ^
/home/imx8/gtec-demo-framework/DemoFramework/FslNativeWindow/Platform/source/FslNativeWindow/Platform/Wayland/PlatformNativeWindowWayland.cpp:851:17: warning: ‘void Fsl::{anonymous}::print_infos(wl_list*)’ defined but not used [-Wunused-function]
851 | static void print_infos(struct wl_list* infos)
| ^~~~~~~~~~~
[363/363] Linking CXX executable DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland
Run command: 'FslBuildRun.py'
- Executable at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection/GLES2.S04_Projection_Wayland'
- Exe CWD at: '/home/imx8/gtec-demo-framework/build/Yocto/Ninja/release/DemoApps/GLES2/S04_Projection'
imx8@imx8-VirtualBox:~/gtec-demo-framework/DemoApps/GLES2/S04_Projection$

 

 

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
890 Views
renethrane-b494
NXP Employee
NXP Employee

Hi

 

The warnings are currently expected and can be safely ignored.

We will get around to removing them but we did review them and deemed them safe to ignore.

 

Best regards, René

872 Views
josephzhou1
Contributor V

Ok. understood.

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
975 Views
josephzhou1
Contributor V

i goto rebuild all toolchain  also same error pls help me

bitbake -c populate_sdk imx-image-multimedia

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
966 Views
renethrane-b494
NXP Employee
NXP Employee

Hi

 

Are you building on a supported Ubuntu version?

Does the ubuntu environment have python3 installed?

 

Best regards, René

961 Views
josephzhou1
Contributor V

YES i do use Ubuntu 20-04. 

ubuntu no issues nor my yocto SDK toolchain .

my end all ok , i go google it i found out it is your NXP Fslbuild.py got issues it is DOS type of cos cnt use under Ubuntu / UNIX lah. see below:

dos is "\n\r"

unix is "\n" only left \r so error come out .

 

(Example :

$ cat test.py 
#!/usr/bin/env python3
print("ok")

$ ./test.py 
/usr/bin/env: ‘python3\r’: No such file or directory
$ dos2unix test.py 
dos2unix: converting file test.py to Unix format ...
$ ./test.py 
ok

)

 

i try it comments out line #1 Shebang line in your file Fslbuild.py  , then ok but again line #32 got "\r" again and also many .py file all DOS TYPe  in your release. i cnt do all manual jobs like this lah , see 

 

the Shebang line 

#!/usr/bin/env python3

===================

mx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ FslBuild.py --Variants [WindowSystem=wayland]
/usr/bin/env: ‘python3\r’: No such file or directory
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ FslBuild.py --Variants [WindowSystem=wayland]
/usr/bin/env: ‘python3\r’: No such file or directory
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$ FslBuild.py --Variants [WindowSystem=wayland]
/media/sf_shared/gtec-demo-framework/.Config/FslBuild.py: line 32: $'\r': command not found
from: can't read /var/mail/FslBuildGen
/media/sf_shared/gtec-demo-framework/.Config/FslBuild.py: line 34: syntax error near unexpected token `$'\r''
/media/sf_shared/gtec-demo-framework/.Config/FslBuild.py: line 34: `PythonVersio'Check.CheckVersion()
imx8@imx8-VirtualBox:/media/sf_shared/gtec-demo-framework$

============

 

like this then how i cnt goto modify all your .py file , pls advices me n how you guys to improve out a good release version pls.

 

FYI  i git clone that

 

just now ?

joseph zhou jian hui

 

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
947 Views
renethrane-b494
NXP Employee
NXP Employee

There are no platform specific endings in our github release it works as any other github release.

1. the tar and zip release are encoded with unix line endings

2. the github checkout per default checks out with the platform specific endings (or whatever your configured it for).

So if you downloaded it from github via a clone its your git settings that are incorrect (or if you cloned on windows and tried to use it under unix).

I suggest you read this -> https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endin...

 

We have verified that cloning and building from github works properly on cleanly installed windows and ubuntu machines so it is something in your configuration that is incorrect. You also need to ensure you never clone on windows and try to use it on ubuntu or the other way around as you will encounter errors like the one you have.