Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Modify makefile for macOS #182

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

feat: Modify makefile for macOS #182

wants to merge 7 commits into from

Conversation

FredeHG
Copy link

@FredeHG FredeHG commented Jun 20, 2024

No pude hacer andar el make install directo desde root, tuve que hacerlo desde la carpeta source

Pensé que era por un problema con cspec pero lo pude instalar lo más bien

haciendo

cd src/
sudo make install
cd ..
cd cspec/
sudo make install # -> con el makefile modificado
cd ..
make install

Corre los test lo más bien, pero todo con el makefile del root no le gusta

README.md Outdated
brew install coreutils
```

Al seguir la guia, antes de hacer los comandos make como se explican abajo deben hacer `cd src/`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Qué aparece al ejecutar make desde root?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahora lo pruebo de nuevo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pero hago el CD y anda, lo que probe recien clonando de 0 es que hay que meterle magia al makefile de cspec o bien a mano o bien subir el cambio xd

image

sudo make install
cd src && /Library/Developer/CommandLineTools/usr/bin/make all
make[1]: Nothing to be done for `all'.
cd tests/unit-tests && /Library/Developer/CommandLineTools/usr/bin/make all
make[1]: Nothing to be done for `all'.
cd tests/unit-tests && /Library/Developer/CommandLineTools/usr/bin/make test
LD_LIBRARY_PATH="../../src/build:../../cspec/release" ./build/commons-unit-test
dyld[41646]: Library not loaded: build/libcommons.so
  Referenced from: <32B8E020-E64A-385C-B660-EB27289DD277> /Users/femedina/Fede/so-commons-library/tests/unit-tests/build/commons-unit-test
  Reason: tried: 'build/libcommons.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OSbuild/libcommons.so' (no such file), 'build/libcommons.so' (no such file), '/usr/local/lib/libcommons.so' (no such file), '/usr/lib/libcommons.so' (no such file, not in dyld cache), '/Users/femedina/Fede/so-commons-library/tests/unit-tests/build/libcommons.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/femedina/Fede/so-commons-library/tests/unit-tests/build/libcommons.so' (no such file), '/Users/femedina/Fede/so-commons-library/tests/unit-tests/build/libcommons.so' (no such file), '/usr/local/lib/libcommons.so' (no such file), '/usr/lib/libcommons.so' (no such file, not in dyld cache)
make[1]: *** [test] Abort trap: 6
make: *** [test] Error 2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Al parecer la variable LD_LIBRARY_PATH se llama DYLD_LIBRARY_PATH:
Screenshot 2025-02-04 at 10 40 53 AM

README.md Outdated
```Bash
brew install gcc@14
brew install coreutils
```
Copy link
Contributor

@RaniAgus RaniAgus Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quizás también agregaría algún paso para hacer que gcc apunte a gcc-14 usando un alias o reemplazando el link: https://stackoverflow.com/a/75648898/14089741

ln -s /opt/homebrew/bin/gcc-14 /usr/local/bin/gcc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no quiero cambiarle el gcc a alguien en su computadora de uso personal/laboral. La afectacion puede ser minima pero lo dejaria así

a menos que pueda hacerlo temporal o solo para una terminal en particular

Copy link
Contributor

@RaniAgus RaniAgus Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿En qué afectaría cambiar el gcc? Si para el trabajo usan clang, podrían compilar con clang. Veo muy poco probable que alguien quiera compilar explícitamente con clang usando el alias gcc que viene preinstalado.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo que comentó no es tanto por el cambio en si mismo, sino porque el alumno va a tirar un comando que va a cambiar su config default sin siquiera entender que es gcc y clang.

No quiero que la catedra tenga nada que ver con un cambio de ese estilo, si podria agregar un alias o lo que sea, pero modificar uno default no me copa.

A nivel impacto supongo que salvo que sean unos megas hackers del re carajo no les cambia nada de nada

@mesaglio
Copy link
Contributor

Yo creo que esto deberia mutar a devcontainer

@RaniAgus
Copy link
Contributor

RaniAgus commented Feb 4, 2025

Coincido con Juani. También, otro problema de MacOS es que no tiene soporte para Valgrind, por lo que la experiencia de desarrollo no está tan buena.

@iago64
Copy link

iago64 commented Feb 4, 2025

+1 a moverlo a un devcontainer

Signed-off-by: Juan Mesaglio <[email protected]>
@mesaglio
Copy link
Contributor

Ahi quedo la configuracion del devcontainer
@RaniAgus me ayudas a validar si el plugin esta tomando la config en src/.vscode/c_cpp_properties.json.

cc @FredeHG probas en tu mac tambien?

@RaniAgus
Copy link
Contributor

RaniAgus commented Feb 10, 2025

@mesaglio probé en la Mac y solo le faltó agregar gdb como dependencia para poder correr el debugger.

Ahí me fijo en Linux y pusheo el cambio. La configuración la toma bien si se abre el proyecto desde un workspace

&& mv cspec-396445c217b366fd3a41c33a38e9a8dd75c3f0e5 cspec \
&& rm cspec.tar.gz \
&& make -C cspec install \
&& rm -rf cspec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tuve un tema para buildear sin bajarme el submodule:
image

Yo creo que tendríamos que meter CSpec en la VM y volar el submodule...

@mefederico
Copy link

Ahi quedo la configuracion del devcontainer @RaniAgus me ayudas a validar si el plugin esta tomando la config en src/.vscode/c_cpp_properties.json.

cc @FredeHG probas en tu mac tambien?

Habia olvidado esto, mañana lo pruebo cuando vuelva de un tramite 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants