Skip to content

Another test#60

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

Another test#60
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Jul 10, 2016

if i do this, it compiles. i have tried doing it locally but it won't work?

if i do this, it compiles. i have tried doing it locally but it won't work?
@phase
Copy link

phase commented Jul 10, 2016

Holy hell, what are you doing? Just clone the repo and modify it locally. If you need to make changes, push them to your github fork. Stop making Pull Requests.

@ghost
Copy link
Author

ghost commented Jul 10, 2016

@phase I'm honestly really sorry as i'm extremely new to Github, and I didn't know it would do that. If you could help me be able to edit and compile instead of doing pull requests instead, that would be greatly appreciated :l I've tried everything i can and i don't know what you mean.

@phase
Copy link

phase commented Jul 11, 2016

In your terminal, run

git clone https://github.com/Thinkofname/steven
cd steven
cargo build

@TestAccount404
Copy link

@phase this is really getting annoying, for me and you. I am really sorry but I have no idea why it's doing this to me. https://gyazo.com/6b931d7711c1b2b8b50423c2527bbb4b

@phase
Copy link

phase commented Jul 11, 2016

Hitting Create Pull Request will not fix anything. You are knowingly making commits, pushing them to your fork, and making a PR. STOP THIS.

Download Rust nightly and see if that works.

@TestAccount404
Copy link

TestAccount404 commented Jul 11, 2016

@phase For god sake, It [pull requests] actually has fixed something. It actually compiled my edit anyway. And i'm not knowingly doing it, i don't even know what i'm doing most of the time. All of this isn't really noob friendly, admit it.

I have downloaded Rust nightly and it's the same problem. Could you record a video of instructions? I think that would make this all resolved faster. It would be a great feeling for me and you if it gets fixed.

@phase
Copy link

phase commented Jul 11, 2016

image of me about to make a pull request

Do you see the bright green button? Do not, under any circumstance, ever press that button. I repeat, do not press the green button. This will not compile your code. There is no way in hell that is fixing anything.

Without a stacktrace, there isn't much I can do. The image you showed does not have one, nor any information as to why the build failed.

@Techcable
Copy link
Contributor

Also, please stop creating alts, @Thinkofname is banning you from the repo for a good reason ;)

@TestAccount404
Copy link

@Techcable @phase banning me won't do shit. Just saying. Also, how am i supposed to learn? OKAY! I get that I don't press that button. But since I can't actually do anything else, i was forced to experiment. What's wrong with you people?

@TestAccount404
Copy link

and it did actually compile the code so don't say it didn't xD

@phase
Copy link

phase commented Jul 11, 2016

banning me won't do shit. Just saying

It stopped you from creating more PRs.

Also, how am i supposed to learn?

Google, StackOverflow, using Bing if you have to.

But since I can't actually do anything else, i was forced to experiment.

I'm still confused on what exactly you're trying to do. Compile Steven? That's something you do on the command line, nothing to do with GitHub.

and it did actually compile the code so don't say it didn't xD

THEN WHAT ARE THESE PRS?!?!?!?!? I THOUGHT THEY WERE AN EXCUSE FOR COMPILING OR SOMETHING!!?!?!?!?

@TestAccount404
Copy link

Yeah. I am actually really sorry. I must be doing something very stupid for you guys to get angry like that. I am a noob, you can tell. I just need help compiling, I do the command and I get frustrating errors that barely have information on google about. All I'm trying to say is that command line's isn't really noob friendly and that if you could find any tutorials of anyone having the same problems, it will deeply appreciated. I am sorry for being so annoying.
https://gyazo.com/6b931d7711c1b2b8b50423c2527bbb4b

@phase
Copy link

phase commented Jul 11, 2016

There has to be more output than that. Run cargo run and screenshot the entire output.

@TestAccount404
Copy link

Am I even supposed to use the actual rust "shell"
https://gyazo.com/b94e7e289dcf54536a3517838afb6820
https://gyazo.com/7ef6f498847869714938e8dd0de2a90b

@marcusball
Copy link

It's failing because you don't have OpenSSL properly installed. Try following the instructions for Windows here: https://github.com/sfackler/rust-openssl

@TestAccount404
Copy link

@marcusball Just tried that, still nothing. I also went on my linux laptop and tried, It looked like it was going to actually work but then i got a big bunch of errors all together right at the end of it. https://gyazo.com/aff45b41f5972743fcae14d3f77ebc76
Thanks for your help btw!

@TestAccount404
Copy link

@marcusball @phase @Thinkofname @Techcable Okay I managed to fix all of the errors and it completed but where is the .exe lmao

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 12, 2016

On linux the executable doesn't have a extension.
Everywhere it's in target/debug/ and called steven.

@TestAccount404
Copy link

@bjorn3 Yeah I thought that but when i put it on my windows pc, i can't run it, i tried changing to .exe but comes up with https://gyazo.com/2bbe84f92b5d571a89579c7a3b9fa8f5

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 12, 2016

Strange

@TestAccount404
Copy link

@bjorn3 Steven / this doesn't like me at all :|

@marcusball
Copy link

You can't just copy a program for Linux and try to run it on Windows. They're two different operating systems with completely different program file types; to run something on Windows, it must be build for Windows. If you want to use this in Windows, you pretty much need it to get the compiling to work on Windows. Did following the instructions for OpenSSL actually change the error message? If it did, then please post the new errors; if you're still getting the same errors, then you did something incorrectly and need to try setting up OpenSSL again.

@TestAccount404
Copy link

TestAccount404 commented Jul 12, 2016

@marcusball Rip. I don't think it changed the message. https://gyazo.com/8701934262942fa6c8df564249ac3e3b

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 13, 2016

Can you put /include in your include path?

@TestAccount404
Copy link

@bjorn3 I don't even know how to do that. Do you have skype? My skype: sylionskype

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 13, 2016

  1. I don't have skype.
  2. Set the INCLUDE_PATH environment variable to <openssl path>\include:<old content of INCLUDE_PATH>. Without : if INCLUDE_PATH was empty.
  3. Do you have sdl2. (Not the current problem, but it will error when linking the exevutable when not).

@marcusball
Copy link

marcusball commented Jul 13, 2016

Rust Installation

First, you need to make sure you're using the correct version of Rust. It needs to be the Nightly version, and for this setup it needs to be the x86_64 Windows release.

(Option 1). Basic Rust install

If you're using the standard Rust installer, you need to select the 64-bit Windows GNU installer under the "Nightly" category. If this is not the version you had, you need to uninstall your current version, and install this one.

nightly

(Option 2). Rustup

If you are using Rustup, then you need to run the following commands:

Install the Nightly 64-bit toolchain:

rustup update nightly-x86_64

Inside the steven repository directory:

rustup override add nightly-x86_64

OpenSSL Setup

I presume you followed these sections of instructions on the rust-openssl page:

Alternatively, install OpenSSL from here. Cargo will not be able to find OpenSSL if it's installed to the default location. You can either copy the include/openssl directory, libssl32.dll, and libeay32.dll to locations that Cargo can find or pass the location to Cargo via environment variables:

env OPENSSL_LIB_DIR=C:/OpenSSL-Win64 OPENSSL_INCLUDE_DIR=C:/OpenSSL-Win64/include cargo build

Please correct me if you followed one of the other Windows options from there; I assume you did this because I think it's the easier route.

If you followed these steps, first make sure you installed the correct version from the linked download page. You almost certainly are using 64-bit Windows, so you need to make sure you installed Win64 OpenSSL v1.0.2h (not the "light" version).

When the installer prompts to ask for the destination location, make sure the path doesn't have spaces and that you remember the location—you'll need it for the next step. For example, I installed it to C:\OpenSSL-Win64.

Now, if you're on Windows 10 or 8, you can right click on the Windows Start button on the bottom left of your screen, and select "System".

system

On the Left menu of the system screen, select "Advanced System Settings". The "System Properties" window will open to the "Advanced" tab; at the bottom of that tab, select the "Environment Variables..." button.

env

Under "System Variables" select the "New..." button. For Variable Name put OPENSSL_LIB_DIR, and for the Variable value, place the path to where you installed OpenSSL. For example, my aforementioned install directory of C:\OpenSSL-Win64. You can use the "Browse" button to find this yourself, if you'd like.

lib

Again, create another "New" variable, and for the name select OPENSSL_INCLUDE_DIR and for the value select the "include" directory within your OpenSSL install (ex: C:\OpenSSL-Win64\include).

Now, close your command prompt/terminal/shell, open a new one.

SDL2 Setup

This is following the instructions for rust-sdl2, from here.

Download SDL2-devel-2.0.4-mingw.tar.gz from the SDL2 download page under "Development Libraries". Note: if you can't open the downloaded file, install 7-zip.

Extract/Open the SDL2 download, then open "SDL2-2.0.4", then "x86_64-w64-mingw32", then "bin". You should see the SDL2.dll file.

If you followed option 1 in the Rust Installation above: Find your rust installation folder. I believe this will be something like C:\Program Files\Rust Nightly GNU 1.12\ or something like that (I don't know for sure). Find that, then find the lib folder inside the Rust installation. Copy the SDL2.dll file into the Rust lib folder; Windows may prompt you to approve as an administrator, just accept that.

If you followed option 2 (Rustup) in the Rust installation above: Go to your Windows user directory; from your screenshots, I can see it's C:\Users\ann. Find the .multirust folder (You may need to Show hidden files first). Then open up the toolchains folder. Inside, you should see the nightly-x86_64-pc-windows-gnu folder you installed; Open that, then from there open the path lib\rustlib\x86_64-pc-windows-gnu\lib. Copy the SDL2.dll into that folder.

After completing one of those above steps, copy the SDL2.dll file to the steven repository folder—the folder where Cargo.toml is located.

Try building again

Close and reopen command prompt/terminal/shell
Open the steven repository, run cargo clean then cargo build.

@TestAccount404
Copy link

@marcusball Okay I must be doing something wrong! Nothing changed ;-; Have you tried team viewer before? Hopefully you have Skype: sylionskype

@lenovouser
Copy link

@TestAccount404 why do you want to develop on Steven if you can even get basic things like SDL2 or OpenSSL running? I have compiled Steven on all 3 platforms successfully before - and yes, I had errors at first too. But just freaking google them or go on Stackoverflow or do something on your own. Seriously. You are never going to learn how to use this if you want people to do the stuff for you. Also. When you compile on Linux the binary only runs on Linux, if you compile on macOS it only runs on macOS and you guessed it - if you compile on Windows it will only run on Windows. It's that simple. If you want your .exe you have to get your Rust and Cargo running properly on Windows. After that you install OpenSSL and SDL2 and that's it. I think @Thinkofname even added documentation for that. You just need to look at it instead of expecting other people to do it for you.

Steven Wiki
Install SDL2
Install OpenSSL

@TestAccount404
Copy link

TestAccount404 commented Jul 15, 2016

@lenovouser I have been looking it up. It's always the same problem. That's why i've asked. You do not have to be rude and if you continue to be, you can go.

@phase
Copy link

phase commented Jul 16, 2016

@TestAccount404 People just get frustrated when they give you detailed instructions on how to do something, which happen to work, and you respond with a completely ignorant, irrelevant comment. Being confused about running a Windows application on Linux (or whatever you're talking about) makes me wonder how you were able to install Linux in the first place.

The first thing you can do is specify what OS you're on. First you say you have Windows, then Linux, and now you're trying to cross-compile? What?! I want you to completely detail your environment to me.

@TestAccount404
Copy link

@phase I am getting errors on my windows PC. When I tried to compile on my linux laptop, I got the same errors. I then fixed the errors on my linux laptop by installing "sudo apt-get install libsdl2-dev" and it compiled fine [but i can't use the .exe in anyway, can i..] when i tried to install / download libsdl2 on my windows pc, nothing changes. I know you guys are trying to help and are giving me very well written stuff that you know what you're talking about but it hasn't fixed anything atleast on my windows pc.

@phase
Copy link

phase commented Jul 16, 2016

Executable files are different on Linux and Windows. Windows has .exe files, while Linux executable don't have a file extension. Linux executable can not run on Windows, and Windows executable can not run on Linux. (Natively, there are tools to run things on other things but that's complicated.)

Are you getting the same error (on the Windows PC) that you showed in https://gyazo.com/aff45b41f5972743fcae14d3f77ebc76 ?

@TestAccount404
Copy link

@phase The extension thing has been explained a lot of times. That error in the image was on my linux laptop which has been fixed. This is the current error on my Windows PC which is the problem:
https://gyazo.com/e750ff98a258554301ed62867a22fe2c

@phase
Copy link

phase commented Jul 16, 2016

Can you tell me the contents of C:\OpenSSL-Win64\include\openssl? If that folder doesn't exist, follow the steps above to install OpenSSL.

@TestAccount404
Copy link

@phase
Copy link

phase commented Jul 16, 2016

The error is saying that it can't find the file openssl/hmac.h, yet it is in the folder that is included in the compile command... Can you show me the contents of the file?

@TestAccount404
Copy link

TestAccount404 commented Jul 16, 2016

@phase
Copy link

phase commented Jul 16, 2016

    ```
    put code between these
    ```

@marcusball
Copy link

Can you attach a screenshot of your Environment variables window, with the aforementioned OPENSSL_ variables visible?

@TestAccount404
Copy link

TestAccount404 commented Jul 16, 2016

@phase

#ifndef HEADER_HMAC_H
# define HEADER_HMAC_H

# include <openssl/opensslconf.h>

# ifdef OPENSSL_NO_HMAC
#  error HMAC is disabled.
# endif

# include <openssl/evp.h>

# define HMAC_MAX_MD_CBLOCK      128/* largest known is SHA512 */

#ifdef  __cplusplus
extern "C" {
#endif

typedef struct hmac_ctx_st {
    const EVP_MD *md;
    EVP_MD_CTX md_ctx;
    EVP_MD_CTX i_ctx;
    EVP_MD_CTX o_ctx;
    unsigned int key_length;
    unsigned char key[HMAC_MAX_MD_CBLOCK];
} HMAC_CTX;

# define HMAC_size(e)    (EVP_MD_size((e)->md))

void HMAC_CTX_init(HMAC_CTX *ctx);
void HMAC_CTX_cleanup(HMAC_CTX *ctx);

/* deprecated */
# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx)

/* deprecated */
int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md);
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
                 const EVP_MD *md, ENGINE *impl);
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
                    const unsigned char *d, size_t n, unsigned char *md,
                    unsigned int *md_len);
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);

void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);

#ifdef  __cplusplus
}
#endif

#endif

@TestAccount404
Copy link

@marcusball I do not understand :l

@phase
Copy link

phase commented Jul 16, 2016

second fucking image I found on google

Get to this screen. (google "windows environment variables" if you don't know how)

Copy the text within the System Variable called Path. Paste that code here.

@TestAccount404
Copy link

@phase
Copy link

phase commented Jul 16, 2016

We need the full path.

@TestAccount404
Copy link

@phase uh

%INTEL_DEV_REDIST%redist\intel64\compiler;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\010 Editor

@phase
Copy link

phase commented Jul 16, 2016

Oh derp, @marcusball needed the OpenSSL variables, which are in the image.

@marcusball
Copy link

marcusball commented Jul 16, 2016

I think you're close! In the image you posted, you can see the OPENSSL_INCLUDE_DIR is set to C:\OpenSSL-Win64\include\openssl. Can you click that line in the window, hit the "Edit" button, then change the value to C:\OpenSSL-Win64\include. Then close your command prompt window, and open a new one, then run cargo clean, followed by cargo build

@TestAccount404
Copy link

@marcusball @phase Thanks and I did that. But um..https://gyazo.com/b6c2320ccae03f8c21fd9de11ae275b9

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 16, 2016

@TestAccount404
Please rerun with the RUST_BACKTRACE set to 1.
The create a issue at rust-lang/rust with the output of cargo.
What you saw last time is a compiler bug 😭😭😭😭

@marcusball
Copy link

Regarding what @bjorn3 said, if you're in command prompt, run set RUST_BACKTRACE=1, then run cargo clean and then cargo build. You should get a more verbose error message with RUST_BACKTRACE correctly set.

@TestAccount404
Copy link

@marcusball @bjorn3 I don't know what else to say other than it didn't work? Why don't you guys get these errors, I mean, I've done that but It's not doing anything else but give me the same errors / messages. If you know anyone that could use skype and help me, I wouldn't mind screen sharing or even just using team viewer. This means a lot to me and your help has really helped me a lot :l

@lenovouser
Copy link

@TestAccount404 I technically could do that but I am not at home at the moment because of work. I'll fly back on the 21st - if you want to wait until then I'll add you. Otherwise try to go into the Rust IRC or Forum.

@TestAccount404
Copy link

@lenovouser Sounds great! My skype: sylionskype
add me when you're back / free time.

@TestAccount404
Copy link

TestAccount404 commented Jul 18, 2016

@marcusball @bjorn3 @phase Do you guys think it would be easier to try the go language version? If so, how do i start :u
https://github.com/Thinkofname/steven-go

@marcusball
Copy link

Honestly, I don't know anything about Go, nor the implementation details of the Go version of Steven, so I can't answer that. Though, honestly, I feel like you're really close to getting this to work.

I sent you a text message on Skype, however, I didn't send you a friend request, so I don't know if it actually went through?

@TestAccount404
Copy link

@marcusball Could you send a friend request? Didn't come through.

@phase
Copy link

phase commented Jul 18, 2016

@Thinkofname talking about the Go version:

Oh and the code in this version is terrible and really messy (all fixable with time) . In comparison the rust version is neater has I had more of an idea of the end goals of the project (due to this version).

I would stick with the Rust version because you've done so much to try and run it.

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

Successfully merging this pull request may close these issues.

8 participants