PaulCombal / SamRewritten

Steam Achievement Manager For Linux. Rewritten in C++.
GNU General Public License v3.0
350 stars 34 forks source link

Can't compile on Trisquel (Ubuntu 16.04) #12

Closed VanackSabbadium closed 5 years ago

VanackSabbadium commented 5 years ago

Hi. I can't compile SamRewritten on my distro, which is Trisquel, based on Ubuntu 16.04.

`vanacksabbadium@Cyclops:~/Desktop/SamRewritten-master$ ./make.sh SAM.Picker/gtk_callbacks.cpp: In function ‘void on_store_button_clicked()’: SAM.Picker/gtk_callbacks.cpp:35:26: error: expected unqualified-id before ‘[’ token for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp:35:26: error: expected ‘;’ before ‘[’ token SAM.Picker/gtk_callbacks.cpp:35:27: error: ‘key’ was not declared in this scope for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp:35:32: error: ‘val’ was not declared in this scope for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp: In lambda function: SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘{’ before ‘:’ token for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp: In function ‘void on_store_button_clicked()’: SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘;’ before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected primary-expression before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘)’ before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected primary-expression before ‘:’ token If there wasn't any compilation error, you can launch the manager with ./bin/launch.sh

vanacksabbadium@Cyclops:~/Desktop/SamRewritten-master/bin$ ./launch.sh Library path is /home/vanacksabbadium/Desktop/SamRewritten-master/bin ./launch.sh: line 10: /home/vanacksabbadium/Desktop/SamRewritten-master/bin/samrewritten: No such file or directory`

Thank you in advance for the answer...

PaulCombal commented 5 years ago

It looks like your GCC version is too old. What is the output of g++ -v ?

Le sam. 31 août 2019 à 06:50, VanackSabbadium notifications@github.com a écrit :

Hi. I can't compile SamRewritten on my distro, which is Trisquel, based on Ubuntu 16.04. ``vanacksabbadium@Cyclops:~/Desktop/SamRewritten-master$ ./make.sh SAM.Picker/gtk_callbacks.cpp: In function ‘void on_store_button_clicked()’: SAM.Picker/gtk_callbacks.cpp:35:26: error: expected unqualified-id before ‘[’ token for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp:35:26: error: expected ‘;’ before ‘[’ token SAM.Picker/gtk_callbacks.cpp:35:27: error: ‘key’ was not declared in this scope for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp:35:32: error: ‘val’ was not declared in this scope for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp: In lambda function: SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘{’ before ‘:’ token for (auto const& [key, val] : pending_achs) { ^ SAM.Picker/gtk_callbacks.cpp: In function ‘void on_store_button_clicked()’: SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘;’ before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected primary-expression before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected ‘)’ before ‘:’ token SAM.Picker/gtk_callbacks.cpp:35:37: error: expected primary-expression before ‘:’ token If there wasn't any compilation error, you can launch the manager with ./bin/launch.sh

vanacksabbadium@Cyclops:/Desktop/SamRewritten-master$ cd bin/ vanacksabbadium@Cyclops:/Desktop/SamRewritten-master/bin$ ./launch.sh Library path is /home/vanacksabbadium/Desktop/SamRewritten-master/bin ./launch.sh: line 10: /home/vanacksabbadium/Desktop/SamRewritten-master/bin/samrewritten: No such file or directory

Thank you in advance for the answer...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PaulCombal/SamRewritten/issues/12?email_source=notifications&email_token=ABJCDPTYV2AKCM26IM7C2O3QHH2BDA5CNFSM4ISSRWD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HISFPLA, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJCDPQ55W6W5VP2UVTOJ4TQHH2BDANCNFSM4ISSRWDQ .

VanackSabbadium commented 5 years ago

vanacksabbadium@Cyclops:$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.5.0-12ubuntu1 16.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1~16.04)

Maybe can i use an older version?

VanackSabbadium commented 5 years ago

Paul, do you have suggestions? I'd really love to use SAM on Linux...

wgpierce commented 5 years ago

The project uses some C++17 features as you see in the error messages. It'd be better to use a distro with updated libraries, but I was able to hack it to work.

I tried it out myself on the distro. You'll need to use an updated g++. Install g++-7 for good measure: http://tuxamito.com/wiki/index.php/Installing_newer_GCC_versions_in_Ubuntu

Change make.sh to use g++-7 instead of g++.

You'll then run into a problem with needing gtk-3.20 instead of 3.18. You could install gtk-3.20, or it seemed that hacking this line to version="3.18" worked fine, though some things may break: https://github.com/PaulCombal/SamRewritten/blob/master/glade/main_window.glade#L25

PaulCombal commented 5 years ago

@VanackSabbadium you need to update your system, you're using a very old distribution.

VanackSabbadium commented 5 years ago

Wow, i didn't expect an answer like that. I think i can choose any distribution i want. Trisquel is one of the few full open-source distribution, is based on a old but very stable Ubuntu version and works like a charm with 99% of open source software i'm using. The fact that you're asking me to change my distribution for a program and a program only is very awful. You know what? I will try to follow wgpierce advices. If they doesn't work, i'm not gonna use your program at all. And yeah, thanks for the support. Very kind.

telans commented 5 years ago

I don't think you should complain when using out of date libraries. It's not like some random dev has decided they're going to use an obscure patch for a program everyone must build themself. C++17 is a standard ratified by the International Organization for Standardization, and you think it's bad that people want to use the features that they set forth as standard?

The version of g++/gcc in the trisquel Flidas repositories is 5.3.1, which was released almost 4 years ago. And you expect new software to not use any of the new features released in the more than _33,000_ commits following 5.3?

VanackSabbadium commented 5 years ago

@wgpierce Thank you very much, it worked like a charm.

@telans You know, you could be right, but the fact is i did not like the answer. It's like "Hey, i hurt my leg, can you help me standing?" "Go fuck yourself, do what you have to do on the floor". I was expecting some kind of help from the developer of the only Linux Steam Achievement Manager software, help that i received with success from another user like me. Was it so difficult? I don't think so. However, i'm sticking with Trisquel until a new version comes out, no matter what.