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

build on Windows #50

Open
wendych864 opened this issue Feb 10, 2023 · 13 comments
Open

build on Windows #50

wendych864 opened this issue Feb 10, 2023 · 13 comments

Comments

@wendych864
Copy link

I checkout the source code from master and offen the .sln file in visual studio community 2017. I build the source code. But there is many errors, e. g. sys/socket.h, sys/time.h netinet/in.h, pthread.h no such file or drectory. sys/time.h etc seems for Linux. I corrected these errors and install vcpkg, Then there are also other errors.

@IngJohEricsson
Copy link
Contributor

OK. I am using Visual studio 2022 and I don't have issues there, not sure what the differences are?

@wendych864
Copy link
Author

wendych864 commented Feb 10, 2023

I build the source on on Windows 10 Pro. the .h files are for Linux. Can you build on windows without problem?

@IngJohEricsson
Copy link
Contributor

Yes I build on Windows 10 with Visual studio 2022.. One of these days I'll try to move away from Visual studio as it is unnecessary complexity for just a command line application. But it will probably take a while before this happens

@wendych864
Copy link
Author

wendych864 commented Feb 13, 2023

when I built scream in Visual studio 2019 on windows pro, I opened build and selected batch build, in the opened window L selected ALL_Build, scream_bw_test_tx, scream_bw_test_rx, or ZERO_CHECK with release, debug, minSizeRel or RelWithDegInfo and tried all options, I got error: "sys/socket.h": No such file or directory. When I changed it and I got sys/time.h. error. I changed again the source, I got error No such file or directory for sys/time.h, netinet/in.h pthread.h and so on. How do you build scream on windows? Do you mean that you will change something this week, so that I can build on windows? I need scream to be compiled on windows recently. I am waiting for your reply after your change.

@IngJohEricsson
Copy link
Contributor

IngJohEricsson commented Feb 14, 2023 via email

@wendych864
Copy link
Author

wendych864 commented Feb 14, 2023

Yes, I opened scream.sln and the source code are opened in visual studio. Then I selected "Build" menu, then "batch build", Then I saw an opened small window with ALL_Build, scream_bw_test_tx, scream_bw_test_rx, or ZERO_CHECK with release, debug, minSizeRel or RelWithDegInfo options. I selected some of them and then clicked on "build". There were then errors"sys/socket.h": No such file or directory. How do you build?

@IngJohEricsson
Copy link
Contributor

IngJohEricsson commented Feb 14, 2023 via email

@wendych864
Copy link
Author

I can build scream in Visual Studio 2022 without error. In build menu, I selected batch build, a batch build window with scream_01 release/Win32, debug/win32 appeared. When I selected release/win32 and debug/win32 and then clicked on build, release/scream_01 und debug/scream_01 are created. But there is no release/win64 and debug/win64 in the batch build window. My Windows 10 pro ist win64. Is this right? Have I built rightly? On mac a sender and receiver are created, for example scream_bw_test_tx and scream_bw_test_rx are created. On Windows only scream_01 created. Is this right? how can I run scream_01 as sender and receiver?

@IngJohEricsson
Copy link
Contributor

OK. I believe now I understand.. The visual studio project only builds a simple simulator that is mostly used to verify that the ScreamTx and ScreamRx is correctly implemented. The scream_bw_test_tx and scrream_bw_test_rx does not currently build on windows

@IngJohEricsson
Copy link
Contributor

IngJohEricsson commented Feb 21, 2023 via email

@wendych864
Copy link
Author

Do you think that we can build scream on windows without to change the source code of scream? sys/socket etc are not for windows. Or we must change the source code for windows to build scream successfully? What do you think the best way to build scream on windows?

@wendych864
Copy link
Author

I built GStreamer Rust plugin and there are 2 errors. Followings are built information:
sh .\scripts\build.sh
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.26)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done (0.1s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/llcto/project_aml_boatattack_scream/scream/code/wrapper_lib
make: *** Keine Targets angegeben und keine »make«-Steuerdatei gefunden. Schluss.
Skipping git submodule https://github.com/gtk-rs/gir due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Skipping git submodule https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git due to update strategy in .gitmodules
Compiling glib-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Compiling gobject-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Compiling gstreamer-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gio-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Compiling gstreamer-base-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gstreamer-video-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gstreamer-rtp-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling rustc-demangle v0.1.21
Compiling atomic_refcell v0.1.9
Compiling gstscream v0.6.0 (C:\Users\llcto\project_aml_boatattack_scream\scream\gstscream)
Compiling failure_derive v0.1.8
Compiling ahash v0.4.7
Compiling gtypes v0.2.0
Compiling argparse v0.2.2
Compiling array-init v0.1.1
Compiling lazy_static v1.4.0
Compiling backtrace v0.3.67
Compiling hashbrown v0.9.1
Compiling failure v0.1.8
Compiling glib v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Compiling gstreamer v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gstreamer-base v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gstreamer-rtp v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Compiling gstreamer-video v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
error[E0425]: cannot find function gettimeofday in crate libc
--> src\screamrx\ScreamRx.rs:577:11
|
577 | libc::gettimeofday(raw_mut, std::ptr::null_mut());
| ^^^^^^^^^^^^ not found in libc

error[E0425]: cannot find function gettimeofday in crate libc
--> src\screamrx\ScreamRx.rs:588:15
|
588 | libc::gettimeofday(raw_mut, std::ptr::null_mut());
| ^^^^^^^^^^^^ not found in libc

For more information about this error, try rustc --explain E0425.
error: could not compile gstscream due to 2 previous errors
Skipping git submodule https://github.com/gtk-rs/gir due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir due to update strategy in .gitmodules
Skipping git submodule https://github.com/gtk-rs/gir-files due to update strategy in .gitmodules
Skipping git submodule https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git due to update strategy in .gitmodules
Checking glib-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Checking object v0.30.3
Checking rustc-demangle v0.1.21
Checking atomic_refcell v0.1.9
Compiling gstscream v0.6.0 (C:\Users\llcto\project_aml_boatattack_scream\scream\gstscream)
Checking time v0.1.45
Checking iana-time-zone v0.1.53
Checking ahash v0.4.7
Checking gtypes v0.2.0
Checking lazy_static v1.4.0
Checking hashbrown v0.9.1
Checking argparse v0.2.2
Checking array-init v0.1.1
Checking gobject-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Checking chrono v0.4.23
Checking gstreamer-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gio-sys v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Checking gstreamer-base-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gstreamer-rtp-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gstreamer-video-sys v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking glib v0.18.0 (https://github.com/gtk-rs/gtk-rs-core#7cde5e99)
Checking backtrace v0.3.67
Checking failure v0.1.8
Checking gstreamer v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gstreamer-base v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gstreamer-rtp v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
Checking gstreamer-video v0.21.0 (https://gitlab.freedesktop.org/gstreamer/gstreamer-rs#12b4a9a0)
error[E0425]: cannot find function gettimeofday in crate libc
--> src\screamrx\ScreamRx.rs:577:11
|
577 | libc::gettimeofday(raw_mut, std::ptr::null_mut());
| ^^^^^^^^^^^^ not found in libc

error[E0425]: cannot find function gettimeofday in crate libc
--> src\screamrx\ScreamRx.rs:588:15
|
588 | libc::gettimeofday(raw_mut, std::ptr::null_mut());
| ^^^^^^^^^^^^ not found in libc

For more information about this error, try rustc --explain E0425.
error: could not compile gstscream due to 2 previous errors

@IngJohEricsson
Copy link
Contributor

IngJohEricsson commented Feb 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants