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

ft_printf not testing in Ubuntu #49

Open
ArenKae opened this issue Feb 2, 2023 · 6 comments
Open

ft_printf not testing in Ubuntu #49

ArenKae opened this issue Feb 2, 2023 · 6 comments
Labels
bug Something isn't working linux

Comments

@ArenKae
Copy link

ArenKae commented Feb 2, 2023

Hi and thank you for your work. I tried to run francinette on Ubuntu Budgie 22.10, but there is a problem when testing ft_printf.

image

execution.log

@xicodomingues
Copy link
Owner

Hello!
For now I'm not giving much priority to problems while running on Linux. I'l keep it in the backlog and may get around to fix it, but not in the meantime.

@xicodomingues xicodomingues added bug Something isn't working linux labels Feb 3, 2023
@ArenKae
Copy link
Author

ArenKae commented Feb 3, 2023

No probs. I'm done with this project anyway, just bringing out the issue !
Thanks again for your reply and for this nice tool :)

@llevasse
Copy link

llevasse commented Feb 9, 2023

Hello, I had the same problem a few weeks ago and managed to fix it, so I'll just post it here if anyone needs it.
cd francinette/tests/printf/printfTester
open the makefile and search those lines

$(MANDATORY): %: mandatory_start $(UTILS_O)
	@$(CC) $(CFLAGS) -D TIMEOUT_US=$(TIMEOUT_US) $(UTILS_O) $(TESTS_PATH)$*_test.cpp -L.. -lftprintf -o $*_test && $(VALGRIND) ./$*_test $(TEST_NUMBER) && rm -f $*_test

$(BONUS): %: bonus_start $(UTILS_O)
	@$(CC) $(CFLAGS) -D TIMEOUT_US=$(TIMEOUT_US) $(UTILS_O) $(TESTS_PATH)$*_test.cpp -L.. -lftprintf -o $*_test && (VALGRIND) ./$*_test $(TEST_NUMBER) && rm -f $*_test

I don't remember why I deleted the $(UTILS_O) but to fix the issue you would need to add the flag -gdwarf-4

$(MANDATORY): %: mandatory_start
	@$(CC) $(CFLAGS) -gdwarf-4 -D TIMEOUT_US=$(TIMEOUT_US) $(UTILS) $(TESTS_PATH)$*_test.cpp -L.. -lftprintf -o $*_test && $(VALGRIND) ./$*_test $(TEST_NUMBER) && rm -f $*_test
 
$(BONUS): %: bonus_start
	@$(CC) $(CFLAGS) -gdwarf-4 -D TIMEOUT_US=$(TIMEOUT_US) $(UTILS) $(TESTS_PATH)$*_test.cpp -L.. -lftprintf -o $*_test && $(VALGRIND) ./$*_test $(TEST_NUMBER) && rm -f $*_test

@mrsourcerer
Copy link

mrsourcerer commented Feb 14, 2023

Hello, I had the same problem and it vanished as soon as I upgraded valgrind to 3.20 version.
Now Tripouille's test runs OK.
But the test of fsoares does not show information and exits as it was ok but performs no tests at all (no OK, KO showing). I don't know if it's related to the valgrind upgrade... but I don't think so because other tests of fsoares (libft or getnextline) run ok.

@tats-faire
Copy link

@llevasse's fix didn't work for me, but @mrsourcerer's did. I had to update manually, as apt-get claims "valgrind is already the newest version (1:3.18.1-1ubuntu2)."
I followed these steps:
wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2 (In the folder where you want to install Valgrind)
tar -xjf valgrind-3.20.0.tar.bz2 (If you get an error message, run sudo apt-get install tar)
cd valgrind-3.20.0
./configure --prefix=/usr/local
make
sudo make install

@tats-faire
Copy link

@llevasse's fix didn't work for me, but @mrsourcerer's did. I had to update manually, as apt-get claims "valgrind is already the newest version (1:3.18.1-1ubuntu2)." I followed these steps: wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2 (In the folder where you want to install Valgrind) tar -xjf valgrind-3.20.0.tar.bz2 (If you get an error message, run sudo apt-get install tar) cd valgrind-3.20.0 ./configure --prefix=/usr/local make sudo make install

Just adding: Valgrind already has a newer version. Check https://valgrind.org/downloads/current.html or https://sourceware.org/pub/valgrind/?C=M;O=D for the most recent one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux
Projects
None yet
Development

No branches or pull requests

5 participants