<ryanprior>Is there a tool to look for unused imports in Guile files?
<marusich>ryanprior, if you find out let me know :)
<raghavgururajan>cbaines or nckx: Shoot! Just came back online. Are you available to right now to help me invesitage access to bayfront?
<marusich>I'm trying to use GNU Global (and gtags) with the guix-daemon source in Guix. I have tried to get global to tell me about "system libraries" from the C++ dependencies provided via "guix environment guix", but I cannot figure out how to do it right.
<marusich>First, in my directory, /home/marusich/guix/repos/guix-worktrees/master, I put the dependencies in a profile via: guix environment --pure guix -r .guix-profile
<marusich>Then I told Global to store its tags here (I need to tell it to write somewhere other than the current directory, or it will write to the store in the next step, which fails): export GTAGSOBJDIRPREFIX="$HOME/.cache/gtags"
<marusich>First, I generated the tags for the dependencies: cd .guix-profile/include/ && gtags -v -O
<marusich>This creates the tags at e.g. /home/marusich/.cache/gtags/gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-profile/include/GRTAGS
<marusich>Then I create tags for the nix subdirectory of the guix project: cd nix/ && gtags -v -O
<marusich>This creates the tags at e.g. /home/marusich/.cache/gtags/home/marusich/guix/repos/guix-worktrees/master/nix/GTAGS
<marusich>Then I go into the nix directory and attempt to find some tags.
<marusich>"global -a open" tells me correctly that there is an "open" function defined in /home/marusich/guix/repos/guix-worktrees/master/nix/libutil/util.cc. That's great.
<marusich>However, when I try to find info about a symbol defined in the "dependencies" (the profile), I can't get it to work.
<marusich>For example, it looks like /gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-profile/include/errno.h declares "extern char *program_invocation_name". So I try to find it with "global -a program_invocation_name" (run while in the /home/marusich/guix/repos/guix-worktrees/master/nix directory). It returns nothing, and adding -v indicates that it doesn't even seem to be looking at the /home/marusich/.cache/gtags/gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-
<marusich>Even if I try explicilty setting GTAGSLIBPATH via "export GTAGSLIBPATH=/home/marusich/.cache/gtags/gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-profile/include", the command "global -va program_invocation_name" still returns nothing and indicates it isn't even looking at the right database.
<marusich>If I try "global -va errno" from the nix directory, global does actually spit out /gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-profile/include/errno.h
<marusich>However, I did have to set GTAGSLIBPATH=/gnu/store/9jpb6shw9a9adl8x9s36gayr0v1z9fmw-profile/include which I guess makes some sense.
<marusich>i thought that i had to set it to the path of the gtags file, but that seems incorrect. you have to set it to the directory containing the source, from which the tags were generated. go figure.
<ryanprior>sneek: later tell lprndn: I'm working through your Pantheon packages and ready to start submitting some upstream. Would you like to sign off on my changes before I send patches or would you rather just comment in the issue tracker thread?
<ryanprior>If I'm submitting patches that have multiple authors, is there a standard we use for how I can acknowledge that? The GitHub standard is to add a line to the commit message like "Co-authored-by: other name <other@email>" for each co-author
<marusich>Glancing at the Git history, I see that we do this.
<marusich>Ugh, today I learned that GNU Global doesn't play well with symlinks, which means it doesn't play well with Guix profiles.
<marusich>I had trouble convincing Global to index all the things in a profile, so that I could conveniently use it to find references, even in "system" libraries (i.e., dependencies which came from outside the project, like from a profile).
<marusich>In the end, the best solution I found was a really dumb one: copy all the files out of the store into a directory (which is now like 500 MB large), and just run "gtags" from the root of that directory. Problem solved. Until I need to update the profile, that is...which isn't that often, I guess.
<marusich>If you do that, you can then point global at the directory you created, with GTAGSLIBPATH, and things will Just Work.
<marusich>The .po files make magit super slow. How do I avoid that again?
<FennecCode>Hey, can anyone help me figure out how to compile a 32 bit binary as a user? I want to work on a project, but it has to be compiled as 32 bit. How would I best get a 32 bit version of glibc into my profile?
<terpri>FennecCode, i had a hack for doing that once (to bootstrap smlnj), i'll ping you if i can dig it up
<FennecCode>I'm just trying to manually compile something for now. I'm not familiar enough with the way that Guix packages work yet.
<marusich>I feel like somebody could craft a package using make-gcc-toolchain (or something like it) which would enable the easy installation of any kind of "gcc toolchain" (e.g., a cross-compiler targeting i686-linux-gnu) for installation in their profile.
<marusich>I'm just not sure exactly what the right combination of things would be.
<terpri>FennecCode, ok, then you won't need my hack (which is specifically for packaging). you might want to use guix environment or similar to keep your main profile clean
<FennecCode>terpri: I would, but my profile is already a mess for now 😅
<marusich>FennecCode, if you want to play around with it, perhaps you can naively try defining packages like the examples janneke provided, and then pass them to the make-gcc-toolchain procedure to see if it produces a usable cross-compilation toolchain targeting i686-linux-gnu.
<FennecCode>It turns out that I don't actually need 32 bit for this even. 😅 I was just kinda confused on how to build this particular thing
<FennecCode>The error I'm running into at the moment is that some stuff related to clocks is undefiend in librt.
<FennecCode>ld: /gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/librt.so.1: undefined reference to `__clock_nanosleep@GLIBC_PRIVATE'
<FennecCode>Maybe I should try making a package out of this? My questions on here honetly aren't all that interesting 😅
<FennecCode>Like, I'm trying to compile a Mario 64 source port, for reference
<ArneBab>When starting an environment with a container (-C), how can I add groups to the user? I’d like to add audio and video
<FennecCode>Ok, it was me being dumb. I didn't have gcc-toolchain installed 😅
<dftxbs3e>marusich, hey! to report on the situation: I can't get cuirass to work and actually run builds, otherwise it runs. VM or Docker still isnt possible, but I figured I'll run cuirass without a service on the command line
<cbaines>ArneBab, I'm not sure there's that level of control yet, that might require changing the guix environment code
<rekado_>I’m trying to import a Guix VM image in AWS EC2.
<rekado_>EC2 doesn’t like the vmdk format produced by qemu-img, so I converted it to raw
<rekado_>now it complains: EFI partition detected. UEFI booting is not supported in EC2
<rekado_>but my example VM doesn’t seem to have an EFI partition
<marusich>rekado the only way i was able to successfully "import" a guix image was to copy the drive image onto an EBS volume and then manually make it the root volume of an existing instance.
<mothacehe>rekado_: Are you sure it doesn't have an EFI partition? In "qemu-image" we always create an EFI partition, regardless of the bootloader.
<marusich>dftxbs3e, that's great! in a way. I haven't made much progress on the non-determinism investigation, I'm afraid...
<rekado_>mothacehe: I’m out of the loop. Is this the recent changes to build the image without qemu?
<cbaines>rekado_, I had some success using packer to generate Guix AMIs for AWS. That's a automated way of spinning up an EC2 instance, adding a EBS volume, doing guix system init to the volume, and then converting that volume to a AMI
<mothacehe>rekado_: Yes it's related, let me see if I can provide you a patch to do that.
<rekado_>cbaines: ideally, I’d just use “guix system” and then two API requests with guile-aws
<dftxbs3e>cbaines, hey, I can give you access to the VM directly if you want - I set up a specification and tried running in one-shot mode and it doesnt run any builds, it creates an evaluation but runs no builds inside it
<cbaines>do you know if there are any builds associated with the evaluation?
<marusich>I'm looking at /root/cuirass-data/specfile.scm
<marusich>I see you launched it via /gnu/store/4sny945i7dbr4ws2k45fs89m617xsbmj-guile-3.0.2/bin/guile --no-auto-compile -e main -s /gnu/store/z09azp31ypwmq6m8fwkmn656p42w33jc-cuirass-0.0.1-30.9559fd1/bin/.cuirass-real -D cuirass.sqlite --web -p 80 --listen=localhost -I 5 -S specfile.scm --cache-directory=cache
<marusich>FWIW, I only really use these things in info: "i" for index entries, "l" for back, spacebar to go forward, "backspace" to go back, ] and [ to go forward/back by nodes (depth first), n and p to go forward/back by nodes (staying at the same level, which skips subsections), "t" to take me back to the top, "tab" for cycling through links (hit "enter" to access them), and "m" for typing names of links/submenus.
<marusich>Oh, also the full text search is useful. control+s, or just /
<sneek>lprndn, ryanprior says: I'm working through your Pantheon packages and ready to start submitting some upstream. Would you like to sign off on my changes before I send patches or would you rather just comment in the issue tracker thread?
<marusich>The "i" index feature is the killer feature of Info if you ask me. Well written manuals in texinfo are super nice to read as references becuase of this. For example, type "info bash" and then "i" and then "@" followed by enter. Takes you right to the explanation for the $@ parameter.
<user123>marusich: I think adding the few commands you've just mentioned to the top of "info info" would be great for new users.
<marusich>user123, emacs-info-plus, and basically all the Emacs packages in Guix, use the emacs-build-system. This is an abstraction that one can use in a Guix package to automatically set up various autoloads (if I understand correctly). The effect is, you only need to install the package with e.g. "guix package -i emacs-info-plus" and then maybe add something to your ~/.emacs file to use it.
<marusich>For example, I have emacs-helm-gtags installed, and I use a form like (require 'helm-gtags) in my ~/.emacs file to use it
<marusich>The benefit of packaging these in Guix is that the management of these Emacs packages now becomes like any other Guix package, and they gain all the benefits that come with that.
<marusich>A downside is that it is different from what a lot of Emacs users are used to, e.g. by using elpa or whatever. But we think the benefits outweigh the downsides.
<rekado_>“…we encourage you to not install too many packages into your base environment, and keep track of versions of packages some other way (e.g. comments inside files, or printing numpy.__version__ after importing it in notebooks).”
<rekado_>OT: I’m so happy that the manufacturer of my signal generator (built 1981) sent me the old manual with schematics, block diagrams, and component placement diagrams. This is how it should be for all electronics.
<zimoun`>marusich: ok. Thanks for the explanations. I will give a try. :-)
<marusich>So, I used one of Stephen's images, in which there were dead items that could not be GC'd. If you launch it with something like "sudo docker run --mount type=bind,source=$HOME/guix/repos/guix,target=/guix-dev --privileged $the-image" you can get your checkout in the Docker container. I ran "herd stop guix-daemon". I built the image in the Docker container. Then I ran ./pre-inst-env guix-daemon, basically.
<marusich>But you could probably build it outside the docker container too.
<mothacehe>Enabling CONFIG_MODULE_COMPRESS cuts down linux-libre size by 63%, that's good news to reduce system closure size!
<zimoun`>Dear, the commmand "guix system docker-image gnu/system/examples/docker-image.tmpl" returns an error. The log seems saying it is because qemu-system-x86_64. I am running on the top of Debian. Do I have to setup something special?
<rekado_>user123: make sure that 1) glibc-locales or glibc-utf8-locales is installed, 2) GUIX_LOCPATH is set, 3) the glibc linked with tmux is the same version as the locales provided by your glibc-locales package.
<bdju>has anyone looked at the emacs-general build failure yet?
<janneke>oh wait, i need to use (native-inputs ... ,@(fold alist-delete (%final-inputs) '("gcc" "gcc-lib"))) and (arguments `(#:implicit-inputs? #f ...)
<user123>rekado_: I believe the problem was due to me installing "glibc-locales", I haven't manually installed them prior. Currently I've installed "glibc-locales" and "glibc-utf8-locales". I also get the message "guile: warning failed to install locale" I'm wondering how I could make sure that the locales provided by glibc-locales are the same version as the glibc linked with tmux.
<guixy>I figured out my problem. .config/chromium/Default/Current\ Session was corrupted. I'll see if there's a way to anonymize it so the Chromium devs can take a look at it.
<janneke>ah, /me forgot about --disable-deduplication for the Hurd
<rekado>I signed up for this Reddit thing to comment on all the misinformation and guide people to the proper help channels
<rekado>annoyingly they rate limit comments; I can only comment once every 10 minutes.
<mfg>Hi there, i was trying to cross build NetBSD from Guix and it seems that the supplied configure scripts don't detect gcc properly. those scripts are generated with autoconf 2.52. Are there any changes to more recent versions of autoconf which could fix this or do i have to search somewhere else?
<davidl>what happens if you remove the /gnu/store/.links directory? What purpose does it serve?
<apteryx>davidl: I think you'll loose deduplication of the store
<rekado>davidl: if you don’t like the directory you better disable deduplication via the guix-daemon option
<rekado>the .links directory contains all unique files
<rekado>so when a package contains the same files as another package you won’t use twice the space
<davidl>rekado, apteryx: ok, the reason Im asking is that I receive a statting error when running guix gc, so I am removing those files mentioned in the error individually - but I have so many files, that even when I remove them individually it is taking hours... http://logs.guix.gnu.org/guix/2020-02-21.log#133446
<davidl>'s/remove them individually/remove them automatically based on error output from guix gc/g'
<rekado>davidl: you should not delete anything in /gnu/store
<rekado>if your file system is corrupted try running fsck instead.
*janneke would consider buying some of that guix warranty thingy
<bricewge>When I get "may not be deterministic" from “guix build --check”, how can I compare them with diffoscope?
<bricewge>Nevermid, my console was too narrow, there is a /gnu/store/...-check
<sturm1>Hi folks, I'm trying to run a `pip install` in `guix environment --container`, but am getting "Download error on https://pypi.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED]". Any ideas? I already have nss-certs in the environment.
<sturm1>gah sorry, ignore the above - think it was just an intermittent network issue :P
<mbakke>probably should be a 'hidden-package' though, otherwise you'll have to update the description to explain why users should use it or not ;-)
<janneke>okay...i was just wondering...i won't submit a user/client for this, so...yeah
<mbakke>right, if there is no user, it's probably not worth adding it to guix proper
<janneke>mbakke: yeah..., it's a weird situation; the recipe in worthwhile to not "forget"
<davidl>rekado: so say that /gnu/store/.links directory is ruined now.. Im on a foreign distro - could I add --disable-deduplication to the systemd unit file, and run a regular guix package -u for all my users, including root - and then remove everything in /gnu/store/.links, and then finally restart the daemon without the --disable-deduplication flag and Im back on scratch?
<davidl>(..to the systemd unit file and restart the daemon*)
<mbakke>janneke: maybe you can change some of the other workarounds in a similar fashion instead :-)
<terpri>ah right, looks like linux doesn't support zstd support yet, although i think someone posted a patchset for it
<nckx>apteryx: I was just talking in the context of mothacehe's experiments, not whether they're worth it or not. I do think file system compression is the way of the future. That does mean that GRUB is doing the decompression instead of Linux, and we know (from LUKS) how spectacular the speed difference can be.
<nckx>terpri: It does, but 5.7 hasn't made it to Guix yet.
<nckx>Or I'm thinking about kernel compression. Anyway, zstd-everything will land soon enough, I'm sure.
<terpri>hm...linux master doesn't have a HAVE_KERNEL_ZSTD option like other compression algos
<guix-vits>nckx: have "solved" the tor-service trouble i has by deleting /var/lib/tor and `reconfigure`. Now it's working.
<nckx>Glad to hear it, although we'll never know what happened.
<nckx>guix-vits: Are you running a relay or just a client proxy?
<nckx>If the former, remember that your keys have changed.
<guix-vits>nckx: just a client, to proxy my https traffic similar to how it shown in Arch Wiki.
<guix-vits>i didn't saved what was deleted, but seems (in comparison with what i've now) that some files in /var/lib/tor were owned by "scanner" (whoever that is). This is the only difference i'd notices.
<pkill9>does anyone get a hash mismatch when trying to build boost-signals2?
<nckx>That's a pretty big difference (they should all be tor:tor). Sounds like your GIDs got shaken up. It happens.
<davidl>How do I write #:use-module in modules that are in channel A when the module to be specified is in channel C? Explanation: I have a module in a guix channel - say channel A, which is dependent on channel B, which in turn is dependent on channel C. The module in A uses simply #:use-module C-module (where C-module is a module defined in the 3rd channel C), and I receive the following error when pulling
<davidl>channel A: (exceptions misc-error (value #f) (value "no code for module ~S") (value ((C-module))) (value #f)).
<nckx>pkill9: I don't think it ever built successfully/was correct, so I'm inclined to just change it.
<guix-vits>davidl: IDK, but did you'd tried to use (add-to-load-path "/some/dir")?
<terpri>so with that snippet pasted above, you can use `(build-system i686-build-system)' in your package and IIRC it will build it with a 32-bit toolchain and make a 32-bit binary that can be installed in a regular 64-bit profile (dragging 32-bit dependencies along with it, of course)
<nckx>raghavgururajan: By the way, the gc's are scheduled at 04:00 and 16:00 local time. I'm guessing bayfront is in the same time zone as I am. It's 23:05 here. There's your answer. It's not a nice one.