Changing agda version recognized by agda command - agda

Now that agda-2.6.3 is released, I have download this new version. The problem I am running into is that my system still recognizes agda-2.6.2.2 as the default version: when I run agda --version in the command line, it returns Agda version 2.6.2.2. I know that I can change which agda version emacs is using by using C-c + C-x + C-s while in an agda file. But, and the main problem I need to solve, is that when I run make check from the terminal command line in a certain directory with agda files, it seems to load and try to check the agda files with 2.6.2.2 which causes certain errors.
I have changed the symlinks .cabal/bin/agda and .cabal/bin/agda-mode to point to the new version of agda, but this has not fixed the issue: I still get Agda version 2.6.2.2 when I run agda --version (and get an error when I run make check in the directory mentioned earlier). This has changed something though. When I type C-c + C-x + C-s in emacs and press return on an empty mini-buffer, it tells me The Agda mode's version (2.6.3) does not match that of agda (2.6.2.2). So somehow this was able to change the version of agda-mode, but not of agda.
Does anyone know why this might be the case? Additionally, does anyone know how to change the agda version recognized by agda command? For reference, I am using Fedora linux.
EDIT :
Here is the output of ls -l ~/.cabal/bin/agda*:
lrwxrwxrwx. 1 rymndbkr rymndbkr 104 Feb 10 16:11 agda -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 125 Feb 11 17:09 agda-2.6.2.2 -> /home/rymndbkr/.cabal/store/ghc-8.10.7/Agda-2.6.2.2-759e1b1bce7dc909fddfed32b6b0bb75821632ef6ac10590d66d5b7aaef1066d/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 104 Feb 7 21:35 agda-2.6.3 -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda
lrwxrwxrwx. 1 rymndbkr rymndbkr 109 Feb 10 16:11 agda-mode -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 130 Feb 11 17:06 agda-mode-2.6.2.2 -> /home/rymndbkr/.cabal/store/ghc-8.10.7/Agda-2.6.2.2-759e1b1bce7dc909fddfed32b6b0bb75821632ef6ac10590d66d5b7aaef1066d/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 109 Feb 7 21:35 agda-mode-2.6.3 -> ../store/ghc-8.10.7/Agda-2.6.3-6fc120f20f643b232442c35c8a992031336f40cabc1db375133c993b327332d8/bin/agda-mode
lrwxrwxrwx. 1 rymndbkr rymndbkr 127 Jun 2 2022 AllNonAsciiChars -> ../store/ghc-8.10.5/agda-stdlib-utils-1.7-ded3c0cc15b1bd55ef2f27702179b83d259612c9910ffc92fa1561024170cf5d/bin/AllNonAsciiChars
lrwxrwxrwx. 1 rymndbkr rymndbkr 129 Jun 2 2022 GenerateEverything -> ../store/ghc-8.10.5/agda-stdlib-utils-1.7-30b294f8e41a4fa403f9cc53aa1bdaad42507be6da4230825ad747024add7592/bin/GenerateEverything
Thanks to gallais in the comments, I ran which agda. Here is the result:
/usr/bin/agda
I think this means that the terminal command agda is looking for agda in the wrong place. But I don't know how to change this. So now my question is: how can I can I change the path of a shell command?

Related

Xcode 13 quick help window not launch on custom objects

Ever since I downloaded Xcode 13 I have been unable to see the quick help window (option click) for objects/functions/variables I have created.
I can see the quick help window for other swift frameworks (option clicking tableView works, for example). Just not for my own.
I have tried
running this in command line:
$ defaults delete com.apple.dt.Xcode WebKitJavaScriptEnabled
deleting this:
~/Library/Caches/com.apple.dt.Xcode
running this:
$ defaults delete com.apple.dt.Xcode IDEIndexDisable
This is what I see when I run:
$ cd ~/Library/Developer/Xcode/DocumentationCache/
$ ls -al
total 0
drwxr-xr-x 4 myname staff 128 Sep 21 13:13 .
drwxr-xr-x 13 myname staff 416 Sep 24 20:38 ..
drwxr-xr-x 3 myname staff 96 Apr 28 10:49 v187
drwxr-xr-x 3 myname staff 96 Sep 21 13:13 v202
Anyone know of any fixes?
A restart of the machine solved the issue for me. Xcode then installed components and built the quick help for Apple's documentation and the documentation in my own code.

Gradle error when building the android-support-test project

I'm trying to build the Android Support Testing project. I'm following these instructions. I've got my build env setup and I've synced the Repo. When I try to build the project I get this error.
$ pwd
/Volumes/android/android-support-test
$ ls -l
-r--r--r-- 1 me staff 87 Feb 5 12:56 Makefile
-rw-r--r-- 1 me staff 749 Feb 5 16:14 android-support-test.iml
drwxr-xr-x 11 me staff 374 Feb 5 12:56 build
lrwxr-xr-x 1 me staff 31 Feb 5 12:57 build.gradle -> frameworks/testing/build.gradle
drwxr-xr-x 16 me staff 544 Feb 5 12:57 external
drwxr-xr-x 4 me staff 136 Feb 5 12:57 frameworks
drwxr-xr-x 3 me staff 102 Feb 5 16:14 gradle
-r-xr-xr-x 1 me staff 5884 Feb 5 12:57 gradlew
lrwxr-xr-x 1 me staff 35 Feb 5 12:57 local.properties -> frameworks/testing/local.properties
drwxr-xr-x 3 me staff 102 Feb 5 16:17 out
drwxr-xr-x 7 me staff 238 Feb 5 12:57 prebuilts
lrwxr-xr-x 1 me staff 34 Feb 5 12:57 settings.gradle -> frameworks/testing/settings.gradle
$ ./gradlew assembleDebug
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* Where:
Build file '/Volumes/android/android-support-test/frameworks/testing/build.gradle' line: 16
* What went wrong:
A problem occurred evaluating root project 'android-support-test'.
> Could not read script '/Volumes/android/android-support-test/version.gradle' as it does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.31 secs
The version.gradle file is in /Volumes/android/android-support-test/frameworks/testing but build.gradle is looking for it in /Volumes/android/android-support-test.
I think the aliasing of build.gradle -> frameworks/testing/build.gradle is not working correctly. Am I missing something?
The frameworks/testing Repo project should have contained an additional sym link, but you can just create it yourself:
ln -s frameworks/testing/version.gradle version.gradle
h/t to John Lombardo on the Android Testing Support Library google group

idlj parameter invalid argument -td mac?

Im trying to follow a tutorial to do a CORBA assignment.
project
-Client/HelloClient.java
-Server/HelloServer.java
-Hello.idl
I do the first step, trying to compile the IDL (from the project root), and it fails.
$ idlj –td Client –fclient Hello.idl
com.sun.tools.corba.se.idl.InvalidArgument: Invalid argument: –td.
java version "1.8.0_11"
$ ls -l
total 16
drwxr-xr-x 3 juliusskye staff 102 Oct 28 20:14 Client
-rw-r-----# 1 juliusskye staff 85 Oct 28 17:49 Hello.idl
drwxr-xr-x 3 juliusskye staff 102 Oct 28 17:52 Server
-rw-r--r-- 1 juliusskye staff 425 Oct 29 13:45 idljintro.iml
drwxr-xr-x 2 juliusskye staff 68 Oct 29 13:45 src
I found this which says CORBA has problems parsing paths with / in front. But mine doesn't have a /
apparently the Lecturer's instructions were wrong or outdated or the compiler is not fully working but compilation of all files is achieved by
idlj -fall hello.idl

Xcode 6 Code Coverage, no GDCA files "cannot open: No such file or directory"

I am trying to generate GDCA files using gcov in XCode, and have been using BubbleFoundry and this post as guides.
I have a separate test target created, which prints a bunch of lines when done like:
profiling: /Users/me/Library/Developer/Xcode/DerivedData/
MyProject-HASH/Build/Intermediates/MyProject.build/Debug-iphoneos/
MyProject Tests.build/Objects-normal/
armv7/mysource.gcda: cannot open: No such file or directory
After trying the instructions in both posts I tried setting up CoverStory, which resulted in the same error message.
My permissions in that directory:
8 -rwxrwxr-x 1 me staff 474 Nov 5 21:54 mysource.d
8 -rwxrwxr-x 1 me staff 220 Nov 5 21:54 mysource.dia
144 -rwxrwxr-x 1 me staff 71136 Nov 5 21:54 mysource.gcno
296 -rwxrwxr-x 1 me staff 148752 Nov 5 21:54 mysource.o
I previously tried running the permissions script from BubbleFoundy, but I still get the cannot open error (a.k.a. gdca files not written).
Apparently, I was generating GCDA files to the phone, which weren't being found. I fixed this by manual deleting all the directories in /Users/me/Library/Developer/Xcode/DerivedData/MyProject-HASH/Build/Intermediates/MyProject.build/ and then rerunning tests in the simulator.

Leopard => Snow Leopard architecture woes with nokogiri / rails

I'm confused. It's a regular state of affairs for me but specifically in this case I felt I could reach out to fellow stackoverflowers (that is, stackoverflow-ers, not stackover-flowers).
uname -a
Darwin macbookpro 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386
set
bash-3.2$ set
...
HOSTTYPE=x86_64
...
MACHTYPE=x86_64-apple-darwin10.0
...
I'm having a nightmare rebuilding some native ruby gems and I'm wondering whether this is part of the problem -- part of this machine says its 64 bit but another part 32 ... as far as I can tell?
Under 'About this Mac' it says 'Intel Core 2 Duo' which Apple says is 64 bit. So why, after doing
sudo gem pristine --all
am I still getting this kind of error?
dlopen(/Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle, 9): no suitable image found. Did find:
/Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle: mach-o, but wrong architecture - /Applications/Rails/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/nokogiri.bundle
Specifically I had removed nokogiri and reinstalled it. No errors in output.
bash-3.2$ sudo gem install nokogiri
Building native extensions. This could take a while...
Successfully installed nokogiri-1.4.2
1 gem installed
thanks for any thoughts!
UPDATE
I've found a useful post by Chris Noos on a similar problem. This is where I am:
cd /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.4.2/
then made a file called wem_extconf.rb:
require 'mkmf'
find_library('xml2', 'xmlParseDoc')
dir_config('any-string-here', '/opt/local/include', '/opt/local/lib')
find_library('xml2', 'xmlParseDoc')
Running sudo web_extconf.rb produces
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -lxml2... no
???? But hang on, it is there:
$ port installed | grep libxml2.*active
libxml2 #2.7.7_0+universal (active)
$ ls -l /opt/local/lib | grep libxml2
-rwxr-xr-x 2 root admin 2623276 31 May 20:09 libxml2.2.dylib
-rw-r--r-- 2 root admin 3643928 31 May 20:09 libxml2.a
lrwxr-xr-x 1 root admin 15 31 May 20:09 libxml2.dylib -> libxml2.2.dylib
-rwxr-xr-x 2 root admin 975 31 May 20:09 libxml2.la
And it does appear I have several copies of the thing -- but not sure which one port installed is using (I'm assuming given it's macports, it's /opt?)
$ ls -l /usr/lib | grep libxml2
lrwxr-xr-x 1 root wheel 15 23 May 16:07 libxml2.2.7.3.dylib -> libxml2.2.dylib
-rwxr-xr-x 1 root wheel 3758272 22 Sep 2009 libxml2.2.dylib
lrwxr-xr-x 1 root wheel 15 23 May 16:07 libxml2.dylib -> libxml2.2.dylib
$ ls -l /usr/local/lib | grep libxml2
-rwxr-xr-x 1 root admin 1456292 30 Oct 2009 libxml2.2.dylib
-rw-r--r-- 1 root admin 4812456 30 Oct 2009 libxml2.a
-rwxr-xr-x 1 root admin 1456292 30 Oct 2009 libxml2.dylib
-rwxr-xr-x 1 root admin 951 30 Oct 2009 libxml2.la
On Snow Leopard, gcc has a misleading behavior; even if you are running a i386 kernel, gcc will produce 64 bits binaries by default.
Have you looked at the GEM documentation to see how to specify the targeted architecture ?
Have you installed the XCode Development tools?

Resources