How to run this debian example?
This is some example code in debian 8.5 software repository. How to run it?
Code:
atscc /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/AUP_5_17_3.dats gcc -I/usr/lib/ats-anairiats-0.2.11/ -I/usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ -L/usr/lib/ats-anairiats-0.2.11/ccomp/lib64/ /usr/lib/ats-anairiats-0.2.11/ccomp/runtime/ats_prelude.c AUP_5_17_3_dats.c -lats AUP_5_17_3_dats.c:58:30: error: ‘PTHREAD_MUTEX_INITIALIZER’ undeclared here (not in a function) static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER ; ^ Exit: [gcc] failed. |
Pedros, you need to supply more information than just this, the error reported is clear in itself.
ps: i see your name and same question all over http://forums.debian.net/viewtopic.php?t=133008 ..... |
$ egrep -r -i pthread /usr/include/* | grep -i pthread_mutex_initializer
/usr/include/pthread.h:# define PTHREAD_MUTEX_INITIALIZER \ /usr/include/pthread.h:# define PTHREAD_MUTEX_INITIALIZER \ ... $ apt-file find usr/include/pthread.h libc6-dev: /usr/include/pthread.h $ sudo apt-get install libc6-dev |
Although if you're missing that most basic of things.
$ sudo apt-get install build-essential devscripts |
to hunkemoller.
error: ‘PTHREAD_MUTEX_INITIALIZER’ undeclared here (not in a function) It seems to me that PTHREAD_MUTEX_INITIALIZER needs to be declared somewhere. And since it was not declared in the example script, I guess the program is looking for the declaration somewhere else. And I am assuming that since the script is included in the debian main software repository, it should run? I found many example scripts that give error messages. I commented the scripts out in the bash file http://pdscript.com/p/debian/example/bash/ats.txt Would you like to see the error messages? And yes, I did post one of them twice at http://forums.debian.net/viewtopic.php?t=133008 It was ignored. You may help with that one if you wish. To avoid double-posting, I avoid asking about the same script twice. I figure if I had the answer to some, then I could apply the answer to the rest. to Shadow_7, Senior Member. I tried to reproduce your work. The file /mnt/01/dists/jessie/main/Contents-amd64.gz does not exist, and so apt-file update gives an error. I installed everything you said to. Result is still the same. to anyone. To be less specific, In the bash file http://pdscript.com/p/debian/example/bash/ats.txt can any of the commented-out scripts be run? |
/mnt/01/dists/jessie/main/Contents-amd64.gz
That's not a usual thing. What special voodoo are you doing? Cygwin under windows? VM? KVM? PXE? local mirror? CD-ROMs? ??? Not that it matters in this case for apt-file as we were "looking" for the missing bits. It's the install lines that matter in terms of end results. Did it fail in the same place same error? You might need to override a lot of things with special voodoo. -I/path/to/stuff -L/path/to/things and various other gcc options depending on what you're trying to do. The blackmagic I had to do for povray on debian armel on a pi B from source was, well, educational. Be sure to follow the ./docs/ or README or INSTALL steps as much as they apply to your situation anyway. The usual configure make make install steps of old don't apply as much anymore. |
I have 13 dvd set debian 8.5. I store it in /mnt.
See details in my post in Linux - General, Where is the best local place to store debian software repository? http://www.linuxquestions.org/questi...84#post5712784 Anyway, I use standard install and default settings as much as possible. Minimal setup. I do not even use sudo. I can try adjusting path. Note that my current settings work for many of the examples. Has anyone got the commented-out examples working? how? |
Quote:
You were chided for "--allow-unauthenticated -y" and a senior member said your post "It has no business being on this forum." and Quote:
Code:
--allow-unauthenticated -y You should try default. it rocks. I encourage free thinking, but there this "thing" called DontBreakDebian or FrankenDebian. Voodoo? FrankenDebian. Have you taken a gander through any other documents in /usr/share/doc/ats-lang-anairiats-examples/ ? Code:
sudo apt-get install debian-handbook See file:///usr/share/doc/debian-handbook/html/sect.setup-apt-package-repository.html or https://debian-handbook.info/browse/...epository.html for repository tips. What you may wish to run to verify the dpkg system is ok using Code:
sudo apt-get install -f FWIW: I don't think you've installed build-essential if gcc is failing. I show 3 distinct ats-lang-anairiats packages: Code:
ats-lang-anairiats - Legacy ATS v1 language compiler, named Anairiats Wow, what a project. Code:
sudo aptitude install ats-lang-anairiats-docs Good Luck. |
to Habitual, LQ Addict.
I should use sudo, and another install method? It most certainly was not ignored. Thank you for clarifying this. Running the script was ignored, but security was not ignored. I was so intent in finding a way to run the script, that I overlooked security. What other install method should I use? /usr/share/doc/ats-lang-anairiats-examples/ has many scripts, not many documents. AUP_5_17_3.dats says this. Author: Hongwei Xi (hwxi AT cs DOT bu DOT edu) book: AUP (2nd edition), pages 332 - 338 section 5.17.3: Thread Synchronization (Mutexes) Author did not respond to my email. I do not have the book. But my question is: how to run this script in debian? I had hoped that my work could be run on a system easily installed and setup by a novice user. And sudo is not installed by default. I know sudo, but the setup instructions are more complicated than I wish for. But you say I should use sudo anyway. file:///usr/share/doc/debian-handbook/html/sect.setup-apt-package-repository.html says: virtual host on internal HTTP server, with /srv/vhosts/packages/ I suppose this answers my question of where to put repository. Thank you. But with internet search I also found these suggestions. /packages/ /var/www/debian/ /usr/local/packages/ /dists I ran apt-get install -f. There were no prompts. Everything looked good. ats-lang-anairiats-doc has a pdf file that tells how to program. It says nothing about system configuration. The project is mostly done. There are simply some rogue scripts that would not compile. The project should be redone: adding reasons in the documentation. adding sudo. changing install method. Do you agree? |
Quote:
|
Quote:
Quote:
Quote:
Code:
atscc /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/AUP_5_17_3.dats How did the package ats-lang-anairiats get installed? From where? When I examined some /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/ file in a .deb I saw only what I guess is gcc code. Quote:
That's good. Get a perspective on how other folks have solved the same problem But since you are a novice and overlooked security, I recommend you start with "The Debian Way". And start documenting this stuff. :) Quote:
You keep mentioning "this script" If "this script" is Code:
atscc /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/AUP_5_17_3.dats Code:
apt-get install ats-lang-anairiats ats-lang-anairiats-doc this package around. Take a breath. Yes, all those. Take another breath. since you already have one of 3 packages already, (ats-lang-anairiats-examples), I omitted it from the above. After that install, open a terminal and issue Code:
atscc /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/AUP_5_17_3.dats Please take some time to have a look at the section titled ### Debian ### Hope I didn't come off as a jerk. Good Luck! |
I now understand there is no standard or official local place to store debian software repository. Diffrent people use diffrent locations. I use /mnt.
I installed sudo, and added this to /etc/sudoers. Code:
Defaults !authenticate Code:
sudo apt-get install ats-lang-anairiats ats-lang-anairiats-examples; I would like everything to be automatic, without prompting. Is there a way to do this that is accepted by the community, or should I abandon this idea of being automatic ? In the bash file http://pdscript.com/p/debian/example/bash/ats.txt many files are listed. They are from the package ats-lang-anairiats-examples. I call these files scripts, but a better term might be code? Some of the lines begin with #. This means the line is commented-out. These commented-out lines have files that will not compile. Perhaps some of them are some sort of template and are not meant to compile as is. Perhaps some of them requre special system setup to compile. I would like to know which. |
$ man apt-get
There's -y --yes --assume-yes that prevents the verification pause. You could also install the keyring stuffs so verification is not something that would be prompting you. And if you have all the packages that it might grab, it'll just do it, and not prompt you when not using the -y option. Otherwise use -y. Code:
sudo apt-get -y install ats-lang-anairiats ats-lang-anairiats-examples ats seems interesting, although I'm not much for languages who's compiler is written in the same language (beyond C anyway). There's too much of a chicken or an egg scenario. Plus lots of things make the claim, can be as efficient as C/C++, like RPerl. Outside of a job, is there a reason to learn ATS over say ADA that actually gets used (probably only by the governments). |
you are running a server/website and are active on at least 2 forums - so you do have internet connectivity.
this offline repo, is it on a different machine? one that is not connected to the internet? |
Quote:
Code:
apt-get -yqq install ats-lang-anairiats ats-lang-anairiats-examples It one of the quickest method. See man apt-get for more on these ("-y, -q") switches, including your use of (and why?) Code:
--allow-unauthenticated --allow-unauthenticated -y for their stuff, I presume. Installing sudo is good for experience, but it is not required for this to work. I have an Debian8.7 installing in Vbox now to see what's what with Code:
atscc /usr/share/doc/ats-lang-anairiats-examples/examples/AUP/AUP_5_17_3.dats Good Luck. |
All times are GMT -5. The time now is 06:38 AM. |