Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 3.38 KB

collaborativedoc8oct.md

File metadata and controls

67 lines (51 loc) · 3.38 KB

Collaborative document - Build Systems Course and Hackathon, October 2024

Icebreaker question

Which program languages are you using?

C: ooooooooo C++: ooooooooooo Python: oooooooooooooooooooo Fortran: ooooooooo Matlab: ooo Scheme: o Java: o Julia: oooo javascript/typescript: oo R: ooo

Compilers/Linkers/Libraries

Slides: https://github.com/PDC-support/comp-link-lib/blob/main/comp-link-lib.pdf Code: https://github.com/PDC-support/comp-link-lib/tree/main

Questions:

  • Does LD_LIBRARY_PATH=$PWD work nicely as well?
    • Technically in this case, but appending with LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD is cleaner, since your command overwrites the whole variable.
    • Great!
  • I would like short summaries (I could google as well!) of differences and use cases between libraries that are:
    • static
    • dynamic
    • shared
      • Good suggestion. We will make these amendments to the slides used in the first lecture. Not right now, but later today.

Make

Lesson: https://coderefinery.github.io/make-lesson/index.html

Exercise until xx:45 https://coderefinery.github.io/make-lesson/exercise.html

In order to reproduce Exercise 3, Step 2, should specify that all "hello" instances should be replaced by "calculation" - Thanks!

Questions:

Introduction to Autotools

Lesson: https://github.com/PDC-support/introduction-to-autotools

configure.ac in example4 and exercise3 have been updated in the repository to include a line AC_PROG_CCtowards the top. This is required when using conditionals (if/then/else) in configure.ac. This is also now explained in an extra slide.

Questions:

  • Are paths to source files needed, like src/? Or are all sub-directories searched through?

    • Subdirectories are not automatically searched through. A typical way to handle a subdirectory is to have a new Makefile.am in the subdirectory and have a list of the subdirectories to consider in the top-level Makefile.am.
    • If you specifically need to refer to a subdirectory from the top-level, you can do $(srcdir)/mysubdir/file.c
    • Please look further in the documentation.
    • Thank you!
  • Can you upload the solutions? (I could not catch how to include the hello.c into the sources). Many thanks. (not pushed to github yet it seems!)

    • Done! (subdirectory solutions in the repository)
  • Is there any command to clean the directory with generated files? In some cases it's hard to find the original files and by removing autogenerated files it's easier to find them. (something like make clean)

    • Some autogenerated files will be removed by make distclean
  • A lot of files are generated which are needed only on developer's computer. Which files are necessary to ship to clients?

    • It depends on if you are only using autoconf or also automake.
    • If only using autoconfthen it is sufficient to ship configure, Makefile.in and config.h.in (essentially all *.in files)
    • If using automake, what's necessary to ship is first the required files README, ChangeLog, NEWS and AUTHORS, but then also aclocal.m4 and all files generated by autoreconf (except the subdirectory autom4te.cache) in addition to the above.
    • Files only required on the developers computer are the configure.ac and Makefile.am as well as some subdirectories created.
    • After having done ./configure, do make distand look at what is included in the tar archive.