LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-12-2018, 08:56 PM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Void Linux / Peppermint Eight
Posts: 6,191

Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Could someone tell me what is going on with slack and files getting screwed up between them..


I got Slack stable, and Slack current installed, I develop using codeblocks, it is set to save files in en_US.UTF-8. I got both systems set to en_US.UTF-8, and still when I do something to my files in one then go to the other one and try to use them again with a make file I get this,


Code:
 make[1]: Entering directory '/tmp/SBo/mh5000-1.3.4/src'
g++  -MM files.cpp img.cpp main.cpp options.cpp timers.cpp > deps.mk
In file included from /usr/include/c++/5.5.0/random:35:0,
                 from files.cpp:28:
/usr/include/c++/5.5.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5.5.0/random:35:0,
                 from img.h:30,
                 from img.cpp:34:
/usr/include/c++/5.5.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5.5.0/random:35:0,
                 from img.h:30,
                 from main.cpp:27:
/usr/include/c++/5.5.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5.5.0/random:35:0,
                 from img.h:30,
                 from options.cpp:33:
/usr/include/c++/5.5.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/c++/5.5.0/chrono:35:0,
                 from timers.cpp:24:
/usr/include/c++/5.5.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
Makefile:10: recipe for target 'deps.mk' failed
make[1]: *** [deps.mk] Error 1
make[1]: Leaving directory '/tmp/SBo/mh5000-1.3.4/src'
Makefile:6: recipe for target 'build-src' failed
make: *** [build-src] Error 2
which confuses me because it is the same, it should work, because it worked before in stable, then I went to current and modded some code and added it to my source where the makefile is using the files, it worked in current, then when I went in to stable to run make again on it, that is what I got.


Stable locale
Code:
# LANG=<locale> locale -k charmap
#
# UTF-8 locales will include "UTF-8" in the output.
#
export LANG=en_US.UTF-8
current
Code:
#!/bin/sh
#Hummmm 14.2+ current 

# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US.UTF-8 is the Slackware default locale.  If you're looking for
# a different UTF-8 locale, be aware that some of them do not include
# UTF-8 or utf8 in the name.  To test if a locale is UTF-8, use this
# command:
#
# LANG=<locale> locale -k charmap
#
# UTF-8 locales will include "UTF-8" in the output.
export LANG=en_US.UTF-8
This was NOT happening when I had a different distro as my 2nd and doing this.
quick edit:
Oh btw, this is using a tar created in current, and using a slackbuild, I just thought of that. so now that I thought of that, let me retar and see what it does, and if it works then, still something is not right to cause this.

well that did not work, I found that if I open the makefile then make a change, hit the space bar, save it, the it ran without error .

except for this function I just put in the code, that worked in current but not stable,
Code:
img.cpp: In function ‘bool is_file_exist(const char*)’:
img.cpp:1185:34: error: variable ‘std::ifstream infile’ has initializer but incomplete type
     std::ifstream infile(fileName);
                                  ^
Makefile:7: recipe for target 'mh5000' failed
make[1]: *** [mh5000] Error 1
make[1]: Leaving directory '/media/projects/Slackbuild.apps/mh5000-1.3.4/src'
Makefile:6: recipe for target 'build-src' failed
make: *** [build-src] Error 2
which that is I think of a different matter.

but then I had to resave the makefile again to get it to not have them errors, what gives?

update, I added fstream to the file and now its back to telling me I need to tell it -std=c++11 which is already in the makefile else it would not even work in current or anywhere, any distro.

I did the make a change in the makefile saved it, then ran make and now it worked, then tared it again then ran the slackbuild on it again the new tarball, and it worked, but that is not a fix. it is a screwed up work around. resave the makefile and retar so it begs the question

... is current screwing up files so they can only be used in current?

Last edited by BW-userx; 05-12-2018 at 09:25 PM.
 
Old 05-13-2018, 02:27 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,253

Rep: Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039
First, there is nothing to analyze as you don't provide a Makefile nor the source file being processed.

Second, to check if the encoding of the Makefile could be involved (on which your post gives no clue, but which is not impossible), save it in POSIX (aka C) encoding and see what happens. You could do the same for involved source files, by the way.

Third, the locale you are using doesn't preclude the Makefile, and generally any file in your system, having any other encoding.

Last, this question "... is current screwing up files so they can only be used in current?" just doesn't make sense to me.

Last edited by Didier Spaier; 05-13-2018 at 12:40 PM.
 
1 members found this post helpful.
Old 05-13-2018, 09:14 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Void Linux / Peppermint Eight
Posts: 6,191

Original Poster
Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Well with that kind of information in your back pocket it’s understandable that the last question makes no sense to you. I did a file -i on my source code files then iconv them , frist time doing that, looked at the results of one of the files. But didn’t look far enough inside of the file. Until it was too late. I’d already replaced the others. Moment later finding out that it had removed 95 percent of its contents.

Then I had to go into scramble mode and find another copy of my files that’d at least put me closer to where I was at when I started fixing some of the code and adding new items to it.


Therefore, I completely stayed away from using that on anything else, once bitten twice shy. So it never even crossed my mind to use file on the makefile due to being traumatized.
ascii was the source files except one was UTF8. So anyways this is turning more into a story then anything else.

Thanks for the information.

Oh and btw I didn’t figure out about the makefile until I had already posted, and was modifying it, just thought to look at that while I was modifying the post. On the fly.

Pointing out, This was not happening when I was using the exact same setup with a different distio, it only cropped up after I installed Slackware then updated it to current, that is when it starting showing its ugly head.

I’m on the bus �� right now. I’ll put more into this when I can.

Thanks again.

Last edited by BW-userx; 05-13-2018 at 02:08 PM.
 
Old 05-13-2018, 02:46 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Void Linux / Peppermint Eight
Posts: 6,191

Original Poster
Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Code:
$ file -i Makefile
Makefile: text/x-makefile; charset=us-ascii
there, that is what it was and still is.

https://unix.stackexchange.com/quest...stead-of-ascii

Last edited by BW-userx; 05-13-2018 at 02:52 PM.
 
Old 05-13-2018, 03:13 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,253

Rep: Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039
So what? Does your programs compile in 14.2 and current

If they don't, did you check that your code included only characters belonging to the ASCII set?

This is what really matters, by the way, as these characters are encoded using one bit even if the file is encoded in UTF-8, so as far as encoding is in concern ASCII is just a subset of UTF-8.

Also, gcc is not as the same version in -14.2 and in -current. Maybe that can explain why compiling fails with one but nor the other compiler when using the same options.
 
1 members found this post helpful.
Old 05-13-2018, 03:56 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Void Linux / Peppermint Eight
Posts: 6,191

Original Poster
Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Quote:
Originally Posted by Didier Spaier View Post
So what? Does your programs compile in 14.2 and current

If they don't, did you check that your code included only characters belonging to the ASCII set?

This is what really matters, by the way, as these characters are encoded using one bit even if the file is encoded in UTF-8, so as far as encoding is in concern ASCII is just a subset of UTF-8.

Also, gcc is not as the same version in -14.2 and in -current. Maybe that can explain why compiling fails with one but nor the other compiler when using the same options.
well I tried an experiment with one of the source files, and just added a new line in it by hitting the enter key, then saved it , then copied the files over into the make file directory, then tried using make on it again then it failed, when it worked before I copied them over. this was in stable.

I was thinking about just redoing my source code files, by creating new ones then copy paste the code into them. which is a blind try, the only thing I did notice was the boost is different, in code blocks I have to recompile it whenever I switch between the two.


it is set to std=c++11 I donno as I have had other distros with more current versions of gcc and I have never had this issue.


I am in current right now and I just, ran make on it, just for you, and it had no issues using the same files that had issues on stable a few minutes ago.


in current.
Code:
$ make
make[1]: Entering directory '/media/projects/Slackbuild.apps/mh5000-1.3.4/src'
g++  -std=c++11 -Wno-switch-enum -Wno-switch -lboost_system -lboost_filesystem -DPREFIX=\"/usr/local\" -DPACKAGE=\"mh5000\" -o mh5000 files.cpp img.cpp main.cpp options.cpp timers.cpp -lm -lX11 -lImlib2 
make[1]: Leaving directory '/media/projects/Slackbuild.apps/mh5000-1.3.4/src'
make[1]: Entering directory '/media/projects/Slackbuild.apps/mh5000-1.3.4/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/media/projects/Slackbuild.apps/mh5000-1.3.4/man'
file -i
Code:
$ file -i *
Makefile:    text/plain; charset=us-ascii
deps.mk:     inode/x-empty; charset=binary
files.cpp:   text/x-c; charset=us-ascii
files.h:     text/x-c; charset=us-ascii
img.cpp:     text/x-c; charset=us-ascii
img.h:       text/x-c++; charset=us-ascii
main.cpp:    text/x-c; charset=us-ascii
mh5000:      application/x-executable; charset=binary
options.cpp: text/x-c; charset=utf-8
options.h:   text/x-c; charset=us-ascii
timers.cpp:  text/x-c; charset=us-ascii
timers.h:    text/x-c; charset=us-ascii

Last edited by BW-userx; 05-13-2018 at 03:58 PM.
 
Old 05-13-2018, 04:08 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,253

Rep: Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039
I don't know if that matters but options.cpp is encoded in UTF-8. What gives this command?:
Code:
iconv -f UTF-8 -t ASCII options.cpp
 
1 members found this post helpful.
Old 05-13-2018, 05:53 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Void Linux / Peppermint Eight
Posts: 6,191

Original Poster
Rep: Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192Reputation: 1192
Quote:
Originally Posted by Didier Spaier View Post
I don't know if that matters but options.cpp is encoded in UTF-8. What gives this command?:
Code:
iconv -f UTF-8 -t ASCII options.cpp
Code:
    static char string_options [] = "rFfoh::a:t:s:n:i:d:c::z:O:S:";
//  no_argument  0
// required_argument 1   (iconv: illegal input sequence at position 2135
that is where it got chopped off , leaving only the top part, when I used iconv to convert it to ascii

this is the orgainal text part
Code:
    static char string_options [] = "rFfoh::a:t:s:n:i:d:c::z:O:S:";
//  no_argument  0
// required_argument 1   (‘:’) to indicate that it takes a required argument
// optional_argument 2  (‘::’), its argument is optional
it's them ticky marks, I removed them and ran it again, and it ran all the way to the bottom.

that should aut'a do it ye?

Last edited by BW-userx; 05-13-2018 at 05:58 PM.
 
Old 05-13-2018, 06:37 PM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 8,253

Rep: Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039Reputation: 3039
Quote:
Originally Posted by BW-userx View Post
that should aut'a do it ye?
Not sure as the non ASCII characters were in a comment, but try.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How Microsoft and Apple are screwing users on multimedia, how to avoid getting screwed ... and what Ogg files are and how to play them on your system LXer Syndicated Linux News 0 04-18-2007 04:31 AM
Ok fresh slack install and screwed up lilo... silverbullet Slackware 5 11-26-2004 01:34 PM
Slack boot screwed up since RH9 nutthick Linux - Newbie 6 11-25-2004 10:21 AM
weird slack prob, totally screwed up my sys AgentDukey Slackware 9 11-23-2004 12:55 AM
Help! need to rescue files from RAID array that winXP Pro screwed up!! newellrp1 Linux - Hardware 3 04-30-2004 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration